We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Hello again,

    I’m setting up this website and I’m now trying to get yams to work with this dropdown menu.
    My current call is like this:
    [[Wayfinder? &startId=`0` &config=`cssplay-dropdown` &rowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/docr/row.tpl`!]]

    The menu works but the Yams menu titles are not loading any more.. any ideas anyone? Perhaps somebody got a row.tpl that works with a dropdown menu?

    I’m using the latest Beta version of Yams i could find on this site and Modx 1.0.2.

    Thanks in advance,

    Thijs



      • 22851
      • 805 Posts
      If you follow the CSSplay Menu - Dropdown recipe from the Muddy Dog Paws website, but make the following alterations to the templates, then it should work:

      [tt][+wf.link+][/tt] -> [tt](yams_docr:[+wf.docid+])
      [tt][+wf.title+][/tt] -> [tt][[YAMS? &get=`data` &from=`pagetitle` &docid=`[+wf.docid+]`]][/tt]
      [tt][+wf.linktext+][/tt] -> [tt][[YAMS? &get=`data` &from=`menutitle` &docid=`[+wf.docid+]`]][/tt]
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
      • Thanks for the reply,

        I got it to work but there is something missing. The parrent title and link are not showing, this is the html that is being generated with this snippet call:

        [[Wayfinder? &startId=`0` &level=`2` &parentClass=`hide` &parentRowTpl=`cssplay_parentRow` &outerTpl=`cssplay_outer` &innerTpl=`cssplay_inner` &rowTpl=`cssplay_row` &outerClass=`menu` &cssTpl=`cssplay_dropdown` &rowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/docr/row.tpl`!]]

        HTML:
        <div class="menu">
        <ul>
        <li class="active">

        <a href="http://localhost/en/home.html" title="BESt By JeeCee" >HOME</a>

        </li>

        <li><a class="last hide" href="http://localhost/en/about.html" title=""></a>
        <!--[if lte IE 6]>
        <a class="sub" href="http://localhost/en/about.html" title=""></a>
        <table><tr><td>
        <![endif]-->
        <ul>
        <li>
        <a href="http://localhost/en/about/history.html" title="HISTORY" HISTORY>HISTORY</a>


        </li>

        <li class="last">
        <a href="http://localhost/en/about/duplicate-of-history.html" title="HISTORY" HISTORY>HISTORY</a>

        </li>


        </ul>
        <!--[if lte IE 6]>
        </td></tr></table>
        </a>
        <![endif]-->
        </li>

        </ul>

        </div>

        I replaced the [+wf.link+] ,[+wf.title+], +wf.linktext+] with the yams calls, what am i doing wrong?

        Thanks in advance
        • I’m under the impression the parentRowTpl is not loading the yams calls...

          Here is my sample:

          <li><a [+wf.classes+] href="(yams_docr:[+wf.docid+])" title="[[YAMS? &get=`data` &from=`pagetitle` &docid=`[+wf.docid+]`]]">[[YAMS? &get=`data` &from=`menutitle` &docid=`[+wf.docid+]`]]</a>
          <!--[if lte IE 6]>
          <a class="sub" href="(yams_docr:[+wf.docid+])" title="[[YAMS? &get=`data` &from=`pagetitle` &docid=`[+wf.docid+]`]]">[[YAMS? &get=`data` &from=`menutitle` &docid=`[+wf.docid+]`]]
          <table><tr><td>
          <![endif]-->
          [+wf.wrapper+]
          <!--[if lte IE 6]>
          </td></tr></table>
          </a>
          <![endif]-->
          </li>

          Why is it not loading the yams calls?
            • 22851
            • 805 Posts
            I’ve just tested it locally and it’s working for me. I tested it on the MODx default install without using the CSSplay Dropdown Menu CSS styles. Some of the links appeared in the HTML but were hidden by the CSS. Thought I’d mention it in case something similar is happening to you.

            In the HTML output you posted up the title attributes and link text are empty for a couple of links. Please make sure that you have specified the menutitle and pagetitle in all languages for that document.

            Apart from that, not sure what to suggest at the moment.
              YAMS: Yet Another Multilingual Solution for MODx
              YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
              Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.