Copied to clipboard

Flag this post as spam?

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


  • Kim Nedergaard 37 posts 144 karma points
    Aug 31, 2010 @ 09:33
    Kim Nedergaard
    0

    XSLTsearch - Search working on same solution with several sites

    Hi guys

    I hope you can help me :)

    I'm having some troubble with the XSLTsearch module, I have a sitetree that looks like this:

    • English
           - Home
           - Profile
    • Spanish
           - Home
           - Profile
    • German
           - Home
           - Profile
    • etc.

    Now, I want to be able to use the same macro and template to search the English site for content, if I'm browsing the English site or search the German site, if I'm browsing the German site.

    I've tried to change macro. Where I've changed the "Source" variable to:

    <xsl:variable name="source" select="$currentPage/ancestor-or-self::node [@level = 1]/@id"/>

    But this doesn't seem to work.

    I think the problem is that in the macro-defination, the source is defined as an "Sitetree" and I provide it with a number/string,

    So anyone who got an idea to how I can solve my problem? :)

    -Kim

     

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Aug 31, 2010 @ 10:42
    Ali Sheikh Taheri
    0

    when you call the XSLTSearch macro what parameter do you pass for SOURCE? 

    Ali

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Aug 31, 2010 @ 10:47
    Ali Sheikh Taheri
    0

    I think it should work in this way, if you pass   [#pageID] for Source

    and then change the SOURCE Variable to the one you have in XSLT macro.

    Ali

     

  • Kim Nedergaard 37 posts 144 karma points
    Aug 31, 2010 @ 12:33
    Kim Nedergaard
    0

    Hi Ali

    Thank you for your answer, but if I put the [#pageID] tag in the source field, I get all of my content - in the search results.

    But instead, I put the pageID of the parent in the querystring when I do my search. (http://page.com/search.aspx?id=1111) and then just use [#id] in my source.

    This seems to do the job.

    -Kim

Please Sign in or register to post replies

Write your reply to:

Draft