We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9995
    • 1,613 Posts
    How can I do a ditto call and show a custom TV in both languages by using 1 dittocall and 1 Tpl?

    I now have:
    [[YAMS? &get=`chunk` &from=`footer`]]


    footer_en has:
    [!Ditto?
    &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` 
    &language=`(yams_mname)`
    &parents=`1`
    &tpl=`footer_en_inhoud`
    &limit=`1`
    &phx=`0`
    !]


    footer_nl has the same only a other Tpl:
    &tpl=`footer_nl_inhoud`



    Chunk footer_en_inhoud has:
    <div class="f-blok">[+f-blok1_en+]</div>
    <div class="f-blok">[+f-blok2_en+]</div>
    <div class="f-blok">[+f-blok3_en+]</div>
    <div class="f-blok">[+f-blok4_en+]</div>
    <div class="clear"> </div>


    And chunk footer_nl_inhoud has the same only: [+f-blok1_nl+] etc..

    This all works but I'd like to reduce the ammount of chunks and calls..
    It should be working when I choose [+f-blok1+] without the _en+] or _nl+] but somehow I cant get this to work.

    I also tried [+f-blok1(yams_name)+] but no luck..

      Evolution user, I like the back-end speed and simplicity smiley
      • 9995
      • 1,613 Posts
      This seems to work for me:

      [[Ditto?
      &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` 
      &phx=`0` 
      &parents=`1` 
      &total=`1` 
      &noResults=` ` 
      &tpl=`footer-inhoud`
      ]]


      footer-inhoud chunk:
      <div class="f-blok">
        [[YAMS? &get=`text` &from=`en::[+f-blok1_en+]||nl::[+f-blok1_nl+]`]]
      </div>
      <div class="f-blok">
        [[YAMS? &get=`text` &from=`en::[+f-blok2_en+]||nl::[+f-blok2_nl+]`]]
      </div>
      <div class="f-blok">
        [[YAMS? &get=`text` &from=`en::[+f-blok3_en+]||nl::[+f-blok3_nl+]`]]
      </div>
      <div class="f-blok">
        [[YAMS? &get=`text` &from=`en::[+f-blok4_en+]||nl::[+f-blok4_nl+]`]]
      </div>
      <div class="clear"> </div>

      [ed. note: fourroses666 last edited this post 10 years, 7 months ago.]
        Evolution user, I like the back-end speed and simplicity smiley
        • 9995
        • 1,613 Posts
        Hmm, some strainge behaviour happening, its not correct yet..
        Somehow the first 3 are correct but the last isn't, some weird caching is going on..
        Still hope someone can help me out. I have always struggled with ditto and yams [ed. note: fourroses666 last edited this post 10 years, 7 months ago.]
          Evolution user, I like the back-end speed and simplicity smiley