We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1526
    • 72 Posts
    I'm trying to setup a list to choose the language in yams. I started from the flags sample http://rtfm.modx.com/display/ADDON/YAMS+Language+Flag+List and stripped out the image tags, adding the html5 nav tag.
    So I have this my main call:
    [[YAMS? &get=`repeat` &beforetpl=`@CODE:<nav id="langnav"><ul class="langlist">` &repeattpl=`otherLangItemTpl` ¤ttpl=`currentLangItemTpl` &aftertpl=`@CODE:</ul></nav>`]]

    the otherLangItemTpl:
    <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+))">(yams_name)</a></li>

    and finally the currentLangItemTpl:
    <li class="yams_lang_(yams_id) yams_current">(yams_name)</li>
    .
    Now I have three language set up, but this is the rendered html:
    <nav class="yams_lang_en yams_current" i<li="">English
       <li class="yams_lang_it">
          <a lang="it" title="" dir="ltr" xml:lang="it" href="http://mysite.com/it/index.html">italiano</a>
       </li>
       <li class="yams_lang_fr">
          <a lang="fr" title="(French)" dir="ltr" xml:lang="fr" href="http://mysite.com/fr/index.html">francaise</a>
       </li>
    </nav>
    

    where you can see that all the beginnning part is messed up: the ul tag is completely missed, and the first (current) li ended up in the nav tag.
    Is it a misstyping error?
    any help?
    thank you [ed. note: andrearicci last edited this post 14 years, 10 months ago.]
      MODx evo 1.5~1.6 ✪ Apache v 2.2.22 ✪ PHP v 5.3.10 ✪ MySQL v 5.1.61
      <°'iiii);
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      To be honest, I wouldn't do it that way in the first place. I would use a chunk, with the nav tag and the YAMS snippet simply using a list type for output. See this comment for possible help.

      https://forums.modx.com/thread/45571/yams-languages-list-amp-classes#dis-post-263730
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 1526
        • 72 Posts
        wow, thank you
          MODx evo 1.5~1.6 ✪ Apache v 2.2.22 ✪ PHP v 5.3.10 ✪ MySQL v 5.1.61
          <°'iiii);