I’m trying to use the same template for different languages, so far so good. However, currently I’m stuck on following problem:
- A multilingual website with e.g. English pages in folder ’English’ and Dutch pages in folder ’Nederlands’
- I have an ajaxSearch call in my template with a non-ajaxSearch call
- I have a result page for English language and one for Dutch language (and more languages to come)
My problem is that I would like to send the user to the proper search result page for her language. For example, if the user uses the search from a page that is in the English section, send her to the ’English Search Results’ page. If the user searches from a page that is in the Dutch (’Nederlands’) folder, send her to the ’Dutch Search Results’ page.
For other things, I used ’UltimateParent’ snippet, but it seems that is not sufficient here. I thought about using some logic such as: ’if UltimateParent is equal to 1 then searchresultpage=10’ and ’if UltimateParent is equal to 2 then searchresultpage=20’ and so on for other languages.
I don’t really know where to start though...
As an alternative, I could duplicate the template, but that effectively doubles the amount of templates I’d have to manage... so I don’t think that would be such a good idea.