We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    I have looked in the forums for a solution to this, but it requires a two column template which I do not really want to do since my whole site is single column. From what I can tell, somewhere in the Ditto core it creates a paragraph or br for each returned child node. Is it possible to tell ditto to not add this extra formatting? From what I read there is no actual command to do so, could a hack be easily implemented?

    My application is that I am calling child nodes and having a picture as a link to the child and the name of the child displayed below it. I can nicely fit 4 across with my template and what will not fit would go to the next line. So right now I get a nice long skinny row down the page sad If a hack is too much of a problem, I guess I would need to find a way to pull in a 4 column ’sub’ template on that page.

    What looks like the easiest solution?

    Thanks!
      • 33372
      • 1,611 Posts
      No need for a hack. Ditto will output anything you like based on the templates that you give it. See the ditto documentation for examples.
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 10226
        • 412 Posts
        ahh well that is a good start. If I use a table, or a div or a <p> it still appears as a long list. How I can I get my text under the picture and still have it do the columns?

        Thanks!
          • 33372
          • 1,611 Posts
          That’s just a question of how you set up your CSS styles. For example if you use a div and float it left (using a class or an inline style definition) then the next one won’t appear underneath as long as there’s room for it to the side. If you prefer to use a table you’ll want to set up your Ditto templates to begin and end the table rows wherever you want those.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 10226
            • 412 Posts
            Thanks.. I will look in to that someday. lol trying to work out a few other bugs for now. The odd thing is that everything works in IE and one bug in Firefox.