I've setup a site and have installed the XSLT search but it's not searching all of the content tree. Presumably because some the content is on a level 'higher' than the search itself.
The blocks of content that I want to *include* in the search results are the three in the box. Without having to restructure the tree so the news, course and testimonials are at the same level (which is a mare as I've already done the work to tear apart the url as they're not really pages, it's a long story!) as the search does anyone know of a workaround please?
In the XSLT file itself there's some commented out lines which when umcommented will search the entire tree regardless of what level the search page itself is at:
<xsl:call-template name="search">
<!-- searches absolutely all pages (useful if you want to search multiple sites at once, or if you do not have all your content pages below a common homepage node in the content tree)-->
Search not searching all content
Hi folks,
I've setup a site and have installed the XSLT search but it's not searching all of the content tree. Presumably because some the content is on a level 'higher' than the search itself.
The blocks of content that I want to *include* in the search results are the three in the box. Without having to restructure the tree so the news, course and testimonials are at the same level (which is a mare as I've already done the work to tear apart the url as they're not really pages, it's a long story!) as the search does anyone know of a workaround please?
Thanks for your time,
Craig
Hi Craig,
Douglas Robar has written a blogpost about how to customizing xsltsearch for specific needs. This blogpost can be found here: http://blog.percipientstudios.com/2009/4/7/customizing-xsltsearch.aspx
Maybe this blogpost can help you including the missing content in your search results. Be awre that it shows the old XSLT using the old XML schema.
Hope this helps you,
/Dennis
Hi Dennis,
Thanks for that...sadly I can't see anything the post that would help me :(
Craig
Hi all,
Found a solution.
In the XSLT file itself there's some commented out lines which when umcommented will search the entire tree regardless of what level the search page itself is at:
<xsl:call-template name="search">
<!-- searches absolutely all pages (useful if you want to search multiple sites at once, or if you do not have all your content pages below a common homepage node in the content tree)-->
<xsl:with-param name="items" select="umbraco.library:GetXmlAll()/*"/>
<!-- searches all pages within a specific site (useful if you have multiple sites in one umbraco installation)
<xsl:with-param name="items" select="$currentPage/ancestor-or-self::* [@level = '1']"/>-->
</xsl:call-template>
So this works for me. Maybe it'll help someone in the future
is working on a reply...