Hi there.
Relatively new to MODx (1.0.4) and trying YAMS (1.1.9) for the first time.
I am trying to generate a language drop-down, as opposed to a series of flags (Am told it’s the preferable way to go these days.)
So I started with your YAMS call, which by the way works perfectly:
[[YAMS? &get=`repeat` &beforetpl=`@code:<ul>` &repeattpl=`otherFlagItemTpl` ¤ttpl=`currentFlagItemTpl` &aftertpl=`@code:</ul>`]]
and modified it thus:
[[YAMS? &get=`select` &beforetpl=`@CODE:<select name="langDD" onchange="javascript:self.location=this.value;" >` &repeattpl=`flagItemDDTpl` ¤ttpl=`flagItemDDTpl` &aftertpl=`@CODE:</select>`]]
where flagItemDDTpl is this chunk:
<option class="yams_lang_(yams_id)" value="(yams_docr)" lang="(yams_tag)" xml:lang="(yams_tag)" dir="(yams_dir)" title="(yams_name_in_(yams_id))" >(yams_name)</option>
I am getting the drop-down, but no action, i.e. nothing happens when I select another language. I have tried &get=selectform, with the same results.
Any ideas what I might be missing?
Thanks.
Regards,
Les@ITworks