there's some 'option' in the xslt which allows to specify where to start searching. Assuming you've got a root node for each of the websites, it should be easy to pass the id of the root node of the website to search.
Look for the 'source' parameter in the macro, should be set to the root node! If not set, xslt search assumes you'll be searching the complete content tree (node = -1)
Thanks a lot! It's working now - but I still had some trouble.
I thought it would be wise to add 2 different doc-types (of XSLTsearch) and then make one template containing the macro (for different settings) for each website, but for some reason it did not recognize the settings passed from the macro in the template for the "new" doc-type I added.
Now I have only one doc-type which allows two templates - one for each side. The downside of this is that the users now can pick a wrong template? Unless I make the users unable to browse the searchpage.
XSLTsearch and multiple websites
Hi.
I'm trying to get XSLTsearch working on my Umbraco installation with 2 seperate websites.
When searching one of the sites, it will return the results of both.
I'm using different templates, macro and xslt files.
How can that be avoided?
Stefan,
there's some 'option' in the xslt which allows to specify where to start searching. Assuming you've got a root node for each of the websites, it should be easy to pass the id of the root node of the website to search.
Look for the 'source' parameter in the macro, should be set to the root node! If not set, xslt search assumes you'll be searching the complete content tree (node = -1)
Hope this helps.
Regards,
/Dirk
Thanks a lot! It's working now - but I still had some trouble.
I thought it would be wise to add 2 different doc-types (of XSLTsearch) and then make one template containing the macro (for different settings) for each website, but for some reason it did not recognize the settings passed from the macro in the template for the "new" doc-type I added.
Now I have only one doc-type which allows two templates - one for each side. The downside of this is that the users now can pick a wrong template?
Unless I make the users unable to browse the searchpage.
Is this the best way of doing it?
I changed the source to <xsl:variable name="source" select="-1" /> and the search is still searching all sites.
is working on a reply...