Copied to clipboard

Flag this post as spam?

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

  • Carlos 338 posts 472 karma points
    Dec 20, 2011 @ 22:42

    XSLTsearch different Alias

    I tried to create my own XSLTsearch XSLT file and copied all of the XSLTsearch code into my custom file. I want to use the XSLT search to search 2 different areas so I want to customize the layout of the XSLT search and add my own layout elements.

    The thing is, when I made my own file, copied all the code in, it did not take my parameters I added in my template.  Meaing I tried to narrow down the properties I wanted to search in only. It worked when my Alias and macroAlias were set to XSLTsearch in my template. 

    But when I tried to use my own Macro using Alias="XSLTsearch-custom" macroAlias="XSLTsearch-custom", the search started searching all nodes within my site. Not just the propeties I set up.

    Do the Alias and the macroAlias need to be XSLTsearch?

    Can I not make my own, copy the code and have it take my parameters?

  • Tom Fulton 2030 posts 4997 karma points c-trib
    Dec 20, 2011 @ 22:44
    Tom Fulton

    Hi Carlos,

    You will need to add the parameters manually to your new Macro.  The parameters are tied to the Macro which is a wrapper for the XSLT file.  If you visit Developer -> Macros -> XSLTSearch you'll see all the ones in the original macro.  You'll need to manually copy these to your new macro if you wish to have two separate files.

    You could also add parameters to the original file and do all your logic there if you like :)


  • Carlos 338 posts 472 karma points
    Dec 20, 2011 @ 22:47

    (Face to palm)

    Duh!  Thanks Tom.  Rookie mistake.

Please Sign in or register to post replies

Write your reply to: