Copied to clipboard

Flag this post as spam?

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


  • Nigel Wilson 944 posts 2076 karma points
    Oct 25, 2011 @ 04:23
    Nigel Wilson
    0

    Full site search not working as expected.

    Hi Doug

    My site had mutiple level 1 nodes and I needed search results to check all nodes. This was not working as expected with a "source" macro parameter of -1.

    So I made a small modification - apologies if someone has already mentioned it.

    On line 130 I have changed the following code

    <xsl:with-param name="items" select="$currentPage/ancestor-or-self::* [@level = '1']"/>

    To this

    <xsl:with-param name="items" select="$currentPage/ancestor-or-self::* [@id = '-1']"/>

    This also works...

    <xsl:with-param name="items" select="$currentPage/ancestor-or-self::root"/>

    Cheers from down under - yep the place where the All Blacks live! 

    Nigel

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 25, 2011 @ 11:44
    Douglas Robar
    0

    Hi, Nigel,

    Your mods will certainly work but there's already code in there that you can comment in/out to get the same behavior. Here's the code from around line 130 for reference and if anyone else stumbles on this issue.

     

    <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>

    cheers, and congrats All Blacks!
    doug. 

  • Nigel Wilson 944 posts 2076 karma points
    Oct 25, 2011 @ 18:26
    Nigel Wilson
    0

    Hi Doug

    A classic case of not seeing the wood for the trees, or at least seeing the trees but not realising I needed some wood !!!!

    Time to crawl under my rock and have a wee sleep.

    Cheers

    Nigel

Please Sign in or register to post replies

Write your reply to:

Draft