Hi, it’s me once more. I still don’t get it running as I wish.
This is the snippet call on my landing page:
[!AjaxSearch? &ajaxSearch=`0` &parents=`in:2,11` &showInputForm=`0` &showResults=`1` &tplResult=`tplResult` &pagingType=`0` &tplResults=`tplResults` &tplGrpResult=`tplGrpResult` &language=`(yams_mname)` &grabMax=`10` &extract=`1:tv_value` &withTvs=`+:content_(yams_id),description_(yams_id),introtext_(yams_id),longtitle_(yams_id),menutitle_(yams_id),pagetitle_(yams_id)`!]
The tplResult looks like
<div class="[+as.resultClass+]">
<a class="[+as.resultLinkClass+]" href="(yams_doc:[+as.id+])" title="[+as.longtitle+]">[[YAMS? &get=`content` &from=`pagetitle` &docid=`[+as.id+]`]]</a>
[+as.descriptionShow:is=`1`:then=`
<span class="[+as.descriptionClass+]">[+as.description+]</span>
`+]
[+as.extractShow:is=`1`:then=`
<div class="[+as.extractClass+]"><p>[+as.extract+]</p></div>
`+]
[+as.breadcrumbsShow:is=`1`:then=`
<div class="[+as.breadcrumbsClass+]">[+as.breadcrumbs+]</div>
`+]
</div>
This should be the code proposed by Fil DOrc in the original post.
I get the following result (using a bi-lingual website in english and german):
The page titles of the found pages are output in the correct language. But the extracts are in random language. I can see no pattern for it. I just had a idea, but it is not correct: The website is still being filled with content, and there are many pages with german content but no english content yet. My idea was that there would always be shown the correct language (testing mainly with german) but if it is not available, the extract would fall back to the other language. But this is not true. And now as I am typing I am wondering how the mono-lingual AjaxSearch could have a buil-it fall-back ...
Does anybody have any idea?