Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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?
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.
My tree looks like this:
Thanks, that's helpful.
What's in the 'Main folder'? Do you have one search page for everything, or a search page per language?
Looks like you are using the ultimate site structure right ?
If so you will need to change the level in xsltSearch to 2
<xsl:with-param name="items" select="$currentPage/ancestor-or-self::* [@level = '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):
CONTENT- Main Folder- English- Danish- Spanish- German
or like this (option B):
CONTENT- Main Folder- - English- - Danish- - Spanish- - German
Perfect Fuji. It works
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...
Write your reply to:
Image will be uploaded when post is submitted