Cameron McCormack wrote:
I’m nearly done getting Batik’s new Forrest-based site ready for
deployment. I’d like to keep the Search widget on the pages, but
Batik’s site is not the whole domain xmlgraphics.apache.org, just the
pages below xmlgraphics.apache.org/batik/. Is there a way I can make
the search box generate an inurl:batik term as well as the
site:xmlgraphics.apache.org to approximate searches under that path more
closely? We’re using 0.8-dev.
Not out of the box, but to implement it you "simply" need to edit
site-to-xhtml.xsl [1]- see the code starting with:
<xsl:comment>+
|start Search
+</xsl:comment>
(NB: there appears to be duplication in this code - not sure if it can
be refactored to a single template I've not checked. It appears at least
twice.)
What you will need to do is add some code to create your second search
option when the page is below the root URL.
It may be useful for me usefull if I point out that the requested
document path is available in <xsl:param name="path"/>
Ross
[1]
http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl?revision=436661&view=markup