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?
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 :)
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?
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 :)
-Tom
(Face to palm)
Duh! Thanks Tom. Rookie mistake.
is working on a reply...