Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I've an XSLT search up and running fine, but I'd like to remove certain doctypes from the results. Two bits I've tried playing with:
<xsl:with-param name="items" select="umbraco.library:GetXmlAll()"/>
I've tried adding a [@nodeTypeAlias != 'Type'] to this, no dice. Also tried:
<xsl:variable name="possibleNodes" select="$items/descendant-or-self::node[
Adding something similar to this part of the XSLT... no dice either. I'm probably just doing it wrong.
Any hints?
Update.
I fixed it. Must have just been some XPath fail. I've added
and @nodeTypeAlias != 'foo'and @nodeTypeAlias != 'bar'
to the "search" template along with the other exceptions and it's working fine.
In hindight now, seems like it should be better to extend the document type to add a 'hide from search'. Maybe next time.
You're right... the umbracoNaviHide property would be an easy way to hide a page from XSLTsearch. But for more complex or automatic situations it is easy to change the way XSLTsearch works, as you found.
I wrote an article about how to customize XSLTsearch for anyone who needs to do it in the future. http://blog.percipientstudios.com/2009/4/7/customizing-xsltsearch.aspx
cheers,doug.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Altering XSLT Search
Hi,
I've an XSLT search up and running fine, but I'd like to remove certain doctypes from the results. Two bits I've tried playing with:
<xsl:with-param name="items" select="umbraco.library:GetXmlAll()"/>
I've tried adding a [@nodeTypeAlias != 'Type'] to this, no dice. Also tried:
<xsl:variable name="possibleNodes" select="$items/descendant-or-self::node[
Adding something similar to this part of the XSLT... no dice either. I'm probably just doing it wrong.
Any hints?
Update.
I fixed it. Must have just been some XPath fail. I've added
and @nodeTypeAlias != 'foo'
and @nodeTypeAlias != 'bar'
to the "search" template along with the other exceptions and it's working fine.
In hindight now, seems like it should be better to extend the document type to add a 'hide from search'. Maybe next time.
You're right... the umbracoNaviHide property would be an easy way to hide a page from XSLTsearch. But for more complex or automatic situations it is easy to change the way XSLTsearch works, as you found.
I wrote an article about how to customize XSLTsearch for anyone who needs to do it in the future. http://blog.percipientstudios.com/2009/4/7/customizing-xsltsearch.aspx
cheers,
doug.
is working on a reply...