Attached is a patch to add a small google site-search field to the navbar. The spacing between the google logo and the input field is a little large, but I'm at a loss as how to fix it (jsl is replacing <br/> with <br></br> which increases the spacing).
To include the search field, add a <search/> element to navigation.xml, in the <body>. E.g: <body> <links/> <menu name="foo"/> <search/> </body> It will appear in the navbar above the Project Documention menu i.e: Menu 1 . . Search ${pom.name} <google logo> [ text field ] <go> Project Documentation While this is pretty cool (I'm biased ;), it isn't much use for intranets - YMMV. Cheers, Tim
Index: src/plugins-build/xdoc/src/plugin-resources/site.jsl =================================================================== RCS file: /home/cvspublic/maven/src/plugins-build/xdoc/src/plugin-resources/site.jsl,v retrieving revision 1.27 diff -u -r1.27 site.jsl --- src/plugins-build/xdoc/src/plugin-resources/site.jsl 4 Jul 2003 08:39:04 -0000 1.27 +++ src/plugins-build/xdoc/src/plugin-resources/site.jsl 7 Jul 2003 14:04:57 -0000 @@ -163,7 +163,7 @@ </j:if> <x:if select="$nav"> - <jsl:applyTemplates select="$nav/body/menu[not(@type) | @type='header']"/> + <jsl:applyTemplates select="$nav/body/menu[not(@type) | @type='header'] | $nav/body/search"/> </x:if> <!-- Standard Maven Navigation --> @@ -412,6 +412,26 @@ <doc:itemLink name="${_name}" link="${_link}"/> <j:set var="linkCount" value="${1+linkCount}"/> </x:forEach> + </jsl:template> + + <!-- Google site search --> + <jsl:template match="search" trim="false"> + <!-- Search code: http://www.google.com/searchcode.html --> + <!-- Google logos: http://www.google.com/stickers.html --> + <!-- Terms: http://www.google.com./services/terms_free.html --> + <div> + <strong>Search ${pom.name}</strong> + <form method="get" action="http://www.google.com/search"> + <a class="navlink" href="http://www.google.com"> + <img src="http://www.google.com/logos/Logo_25wht.gif" + alt="Google" border="0" /> + </a><p/> + <input type="text" size="15" name="q" maxlength="255" value=""/> + <input type="submit" value="Go" name="btnG"/> + <input type="hidden" name="domains" value="${pom.url}"/> + <input type="hidden" id="search" name="sitesearch" value="${pom.url}"/> + </form> + </div> </jsl:template> <!-- process a documentation section -->
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]