When you first search for a WikiName (topic) and not find it, you often like to create the new page (see Ideas, March 7, 2003 - 3 ideas: a new "edit link"; a "print" button; upper-left sign-in). The modification in the TagLib and the JspTemplate at the bottom of this page shows you how to customize your JSPWiki.

-- DirkPessarra, 10-Feb-2004

TagLib#

Insert the line with the asterix into the file WEB-INF/jspwiki.tld, to create the link Edit or Create '[searchstring]' on the FindPage after the google link.

  <tag>
    <name>EditLink</name>
    <tagclass>com.ecyrd.jspwiki.tags.EditLinkTag</tagclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
       <name>page</name>
*      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
       <name>format</name>
    </attribute>
    <attribute>
       <name>version</name>
       <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>

JspTemplates#

Insert the lines with the asterix into the file /templates/default/FindContent.

          <P>
          <A HREF="http://www.google.com/search?q=<%=query%>" TARGET="_blank">
            Try this same search on Google!</A>
          </P>
*         <P>
*            <wiki:Permission permission="edit">
*                <wiki:EditLink page="<%=query%>">Edit or Create '<%=query%'
*                </wiki:EditLink>&nbsp;&nbsp;
*            </wiki:Permission>
*          </P>


Discussion

I don't agree with JanneJalkanen that this is taste, it is comfort. You see it also at http://www.twiki.org.

-- DirkPessarra, 10-Feb-2004


Back to Ideas

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-20) was last changed on 22-Jan-2011 12:40 by Harry Metske