Quote from: Frank at Nov 17, 2009, 02:11 PM
I also am wondering how to use flags for language selection. Sorry if I read over a possible threads with a solution, but modx search does not seem to function in the forum,
You should be able to do something like this (untested):
[[YAMS? &get=`repeat` &beforetpl=`@code:<ul>` &repeattpl=`otherFlagItemTpl` ¤ttpl=`currentFlagItemTpl` &aftertpl=`@code:</ul>`]]
where otherFlagItemTpl is a chunk that contains
<li class="yams_lang_(yams_id)"><a href="(yams_docr)" lang="(yams_tag)" xml:lang="(yams_tag)" dir="(yams_dir)" title="(yams_name_in_(yams_id+))"><img alt="(yams_name)" src="[(site_url)]assets/images/flags/(yams_id).png"/></a></li>
(a linked flag image) and currentFlagItemTpl is a chunk that contains
<li class="yams_lang_(yams_id) yams_current"><img alt="(yams_name)" src="[(site_url)]assets/images/flags/(yams_id).png"/></li>
(an unlinked flag image) and you have flag images with the format (yams_id).png in the directory assets/images/flags/.
EDIT: Corrected typo. otherflagItemTpl -> otherFlagItemTpl