Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    Jun 20, 2014 @ 16:06
    Craig O'Mahony
    0

    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

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jun 20, 2014 @ 16:45
    Dennis Aaen
    0

    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

  • Craig O'Mahony 364 posts 918 karma points
    Jun 20, 2014 @ 17:07
    Craig O'Mahony
    0

    Hi Dennis,

    Thanks for that...sadly I can't see anything the post that would help me :(

    Craig

  • Craig O'Mahony 364 posts 918 karma points
    Jun 23, 2014 @ 11:59
    Craig O'Mahony
    100

    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

Please Sign in or register to post replies

Write your reply to:

Draft