We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22448
    • 241 Posts
    Hey all,

    i’ve been making an extensive use of the ((yams_data:id:field)) placeholder and really like this shorthand.
    so when the time came to setup a ditto template i continued to use it but found that they don’t get parsed but rather are displayed as is. Using the snippet call format [[YAMS? &get=`data` &from=`field` &docid=`id`]] in Ditto template works though.
    I understand that the snippet generates the placeholders behind the scenes, so why wouldn’t YAMS recognize the placeholders without the translation?

    Thanks.
      • 22851
      • 805 Posts
      Hi outre99. I can’t be sure why that’s not working without doing some tests. Like you say, the YAMS snippet call outputs those placeholders anyway, but perhaps the fact that they get incorporated into the document at different points in the parse-cycle is making a difference.

      Please could you tell me whether your ditto call is cacheable/uncacheable and exactly how the placeholder appears in your ditto template? I’m guessing it’s [tt]((yams_data:[+id+]:pagetitle))[/tt], for example. Thanks.
        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.
        • 22851
        • 805 Posts
        Outre99. I just remembered. There was a bug in previous versions that meant that ((yams_data:...)) placeholders were not getting parsed under certain circumstances, but this was fixed in YAMS 1.1.9. This is probably the same problem that you have. If you’re not using YAMS 1.1.9 then please could you upgrade and try again?

        Cheers.
          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.
          • 22448
          • 241 Posts
          Hey PMS,

          Thanks for the suggestion but i already loaded the latest version: 1.1.9

          Here’s the Ditto call:
          [!Ditto? &id=`news_(yams_id)` &language=`(yams_mname)` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &tpl=`@FILE assets/chunks/featured_article_tpl.chk` &parents=`147` &filter=`featured,No,2` &randomize=`1`  &display=`1` &dateSource=`articleDate` &dateFormat=`%d-%m-%Y` !]


          Here’s Ditto template that i’m using for testing. I started to use menutitle just for testing to remove any possible other causes of the problem. In actuality i’ll need to use a custom tv.

          <h2><a href="[+parent+]">[[YAMS? &get=`data` &from=`longtitle` &docid=`[+parent+]`]]</a></h2>
          <div class="col-copy" style="background: [*pageColor*];">
              ((yams_data:[+id+]:menutitle))
              <h4><a href="[~[+id+]~]">[+longtitle+]</a></h4>
          	<span class="date-stamp">[+date+]</span>
              <p>
                 [+introtext+]
              </p>
          	<a class="more-link" href="[~[+id+]~]">Read more >> </a>
          </div>


          Here’s what i tried and the results:

          1. ((yams_data:[+id+]:menutitle)) - shows up as ((yams_data:146:menutitle)) on the page. So the id placeholder is getting parsed but not the YAMS placeholder.
          2. [[YAMS?&get=`data` &from=`menutitle` &docid=`[+id+]`]] - works as it should

          YAMS plugin appears first in all of the assigned events.
          Please let me know if you have any ideas on where to look next.

          Thanks.



            • 22448
            • 241 Posts
            Hi PMS,

            sorry for the bump.
            Still am having this problem. It happens not only in a Ditto template but straight in the templates as well. The placeholder get rendered with the resolved docid.

            Already updated to 1.1.9 without any improvement.

            Thanks in advance.