We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27147
    • 53 Posts
    I’m having some trouble getting my head around this one:

    I want to list some videos on a page, each video item formatted by a template chunk and with editable TV fields. But I also want the items to belong to categories which wrap the items in their own template chunk.

    If I could call Ditto recursively (first on the page, then in the category chunk) this would be possible, albeit laborious. As it is, I can’t see any way to make it work.

    Anyone?
      • 27147
      • 53 Posts
      I’m guessing from the lack of responses that it’s time to roll up sleeves and write a snippet. smiley
        • 25663 MODX Staff
        • 12,272 Posts
        Ditto and tagging should work.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 27147
          • 53 Posts
          That’s what I thought. But I’ve looked closely at the wiki entries on Ditto tagging as well as the topic Cycle through several TV values to build a related link list with Ditto and there aren’t enough template params to specify a wrapping template for each category. The items from all the tags come out as one long list. Maybe as the tagging support matures in Ditto there will be some of the templating flexibility that Wayfinder has.

          In the meantime, I think I’ll have to write a snippet to grab the categories with their Ditto calls.

          (Since there appears not to be a generic solution to this problem, maybe this thread should be moved to the Ditto forum.)

          BTW Ryan, time to upgrade your sig to 0.9.6  wink
            • 25663 MODX Staff
            • 12,272 Posts
            Nah ... I’m wating for 097 tongue

            (nice catch and thanks!)
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 34017
              • 898 Posts
              If your TV is called Tags, you could wrap the ditto call for each category as <div class="[+tvTags+]">content</div>. You could atleast set different styles for each category.
                Chuck the Trukk
                ProWebscape.com :: Nashville-WebDesign.com
                - - - - - - - -
                What are TV's? Here's some info below.
                http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
                http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008