How do i make the search to only look under the current domain?
On the danish website, i sometimes have an english text, but i only want results from the danish domain, not from the english domain. Plus i have 2 more domains setup.
Can you show a sample of how you've set up your content trees for the different domains? That will help a lot in explaining 'how to' and being sure to give the best answer.
For example, often people have this sort of content tree:
CONTENT - EN - - Products - - About - - Search - DK - - Danish Products - - Danish About - - søg - FR - - French Products - - chercher
Each language has its own section of the site, with its own search page.
That should be configurable with one of the parameters you pass to the macro - the source parameter, I believe it is...
Had a quick look at the XSLT file - it seems like if you set it to the search page's id, it will only search within the "site" that contains the search page.
Exactly, Chriztian -- if you have a content tree set up as shown above, you can leave the 'source' parameter EMPTY for the XSLTsearch macro and it will automatically search only within the part of the tree the search page appears within. That way you can use the same template and settings for all search pages and it will 'just work' :)
Be sure to update the dictionary keys for your various languages, too, to get maximum multi-lingual support. The keys are all set up for you, you just need to translate them to your languages and again, it will just work.
Multi lingual website
Hi,
How do i make the search to only look under the current domain?
On the danish website, i sometimes have an english text, but i only want results from the danish domain, not from the english domain. Plus i have 2 more domains setup.
Can this be accomplished?
It can!
Can you show a sample of how you've set up your content trees for the different domains? That will help a lot in explaining 'how to' and being sure to give the best answer.
For example, often people have this sort of content tree:
Each language has its own section of the site, with its own search page.
cheers,
doug.
Hi Peter,
That should be configurable with one of the parameters you pass to the macro - the source parameter, I believe it is...
Had a quick look at the XSLT file - it seems like if you set it to the search page's id, it will only search within the "site" that contains the search page.
/Chriztian
Exactly, Chriztian -- if you have a content tree set up as shown above, you can leave the 'source' parameter EMPTY for the XSLTsearch macro and it will automatically search only within the part of the tree the search page appears within. That way you can use the same template and settings for all search pages and it will 'just work' :)
Be sure to update the dictionary keys for your various languages, too, to get maximum multi-lingual support. The keys are all set up for you, you just need to translate them to your languages and again, it will just work.
cheers,
doug.
Hi,
My tree looks like this:
CONTENT
MAIN FOLDER
ENGLISH
DANISH
SPANISH
GERMAN
Thanks, that's helpful.
What's in the 'Main folder'? Do you have one search page for everything, or a search page per language?
cheers,
doug.
Looks like you are using the ultimate site structure right ?
If so you will need to change the level in xsltSearch to 2
Ahhh... thanks, Fuji, that might be it. The way Peter formatted his answer the nesting/indentation isn't obvious but you maybe correct.
Peter, is your site structured like this (option A):
or like this (option B):
cheers,
doug.
Perfect Fuji. It works
Thanks everybody.
No worries, this is what this community is all about. Sharing and helping others.
Thanks to the Life Time MVP for this package !
is working on a reply...