We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1261
    • 27 Posts
    I’m interested in using Ditto to implement a pretty, easy-to-maintain "Bio List" for the Board of Directors of the non-profit I’m designing a homepage for. I know the ditto documentation suggests this as a potential use, but I can’t find any entry-level resources on customizing Ditto in this way.

    It looks relatively simple -- set up a template chunk including the markup and the template variables for the content I want, then add a [[ditto]] snippet to the page I want to put the bios on. But how do I set up the documents that Ditto will format/display? I presume I make them children of the main page, but what template do I use? If I want custom information, like an image, how do I add that to the entries in a way that Ditto will know how to display it? Is there some sort of "Ditto for Dummies" out there that lists this stuff?

      • 16885
      • 255 Posts
      There aren’t quite any dummy guides that I know of, besides the Wiki. The way I’d do is would be simple but I hope, yet efficient; simply create the ’bio’ page and add sub documents to that one for each director. In those documents I’d simply put the (x)HTML formatted data in the way you want it, doing it like that you wont have to do a lot of complicated things; you simply let ditto list documents under the current one. You could even just put that info in the description field, and allow users to click further to the ’main’ article of these directors, which could contain more info and such.
        • 1261
        • 27 Posts
        Ok, I made it work using your solution, but I’d really like to implement some TVs storing specific information (eg: title, a headshot, etc) so that my users don’t inadvertantly mess up the neat formatting in the future.

        So, I created a new template to display the bios. It has an image TV called rc_bios_image, and a text TV called rc_bios_jobtitle. To get Ditto to display these in the list, I was under the impression I’d use [+tvrc_bios_image+] and [+tvrc_bios_jobtitle+] .. am I missing something obvious here?
          • 33337
          • 3,975 Posts
          I guess, these TV are not assigned to the template you are displaying listing on, to overcome this, use
          &hiddenTVs=`your_tv_goes_here,2nd_goes_here,3rd,4th`

          More reading at: http://modxcms.com/ditto_parameters.html

          Hope this helps.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link