Each template has a localized search
Dutch template: {search lang="nl_NL"}
French template: {search lang="fr_FR"}
It would be great if I could specify what folder the individual search entries should search with a tag like {search lang="nl_NL" index="Dutch"} ("Dutch" being the page name or section header name of the parent page containing all dutch sub-pages...)
Currently, both the dutch and french pages are shown in the search results.
My current folder structure is something like this:
- Dutch (Section Header)
- - Page 1 (regular content page with the dutch template containing only dutch content)
- French (Section Header)
- - Page 1 (regular content page with the french template containing only french content)
Alternative Solution?
If this isn't possible, could it be possible to get the individual search results to show an image based on their parent page? (like a little flag icon)
This way, the user could clearly see if a page is in french or dutch before visiting the page and getting all confused because it's in a foreign language...

For this to work, we would have to pass the title of the section header or parent page to the search result template with a tag like {$parentpagetitle} or something like that...
Alternative solution 2?
As I'm using the {page_class} tag to fill out the body class, maybe this can be used to somehow help to show a custom image for the individual search result?
The generated html output looks like this () and contains the relevant information about the parent pages...
Original thread concerning the page_class tag: http://forum.cmsmadesimple.org/index.ph ... l#msg84973
Alternative solution 3?
A different possibility might be to use the CustomContent module and use some of the tags described by Callguy1000 in the thread below?
The problem is that this will pass the values of the parent pages of the search result page, not the values of the parent pages of the individual search results... (If i'm correct)
http://forum.cmsmadesimple.org/index.ph ... l#msg87374
In the head:
Code: Select all
{capture assign='root_alias'}{$ccuser->get_root_alias()}{/capture}
{capture assign='root_title'}{$ccuser->get_page_title($root_alias)}{/capture}
{capture assign='parent_alias'}{$ccuser->get_parent_alias()}{/capture}
{capture assign='parent_title'}{$ccuser->get_page_title($parent_alias)}{/capture}
in the result template:
Code: Select all
{foreach from=$results item=entry}
<li class="{$root_alias}">{$entry->title} - <a href="{$entry->url}">{$entry->urltxt}</a> ({$entry->weight}%)</li>
Greetings,
Manuel