Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Chad 65 posts 129 karma points c-trib
    Jan 14, 2010 @ 03:11

    Altering XSLT Search


    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?

  • Chad 65 posts 129 karma points c-trib
    Jan 14, 2010 @ 04:09


    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.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 14, 2010 @ 21:44
    Douglas Robar

    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.


Please Sign in or register to post replies

Write your reply to: