We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16311
    • 28 Posts
    Apologies if this isn’t the best part of the forum to ask this, however I’m looking at setting up a MODx site for a client, one where they’ll be handling the updating of site’s content. The trouble is, they have a number of product pages, where on each page are blocks of information about multiple products and I’m struggling to think (with limited MODx knowledge) of a way to give the client an easy interface to add and edit products from such pages. So basically, they’ll have a page which might have six products on it, with each product being represented as a gif, some text below that and then another gif to right of the text. Below all that would be a line, followed by the same three elements again for a different product etc.

    So, I figure I could do this by simply popping a [*content*] tag in the template and therefore have a single TinyMCE instance in the manager to hold all the products of one page, including the formatting of the gifs in relation to the text. But if possible I’d really like to give more control of the formatting of these ’product blocks’ to the template, rather than to the person editing the document. If I was creating a page that held just one product, I would simply create some template variables, one for each gif and one for the text, thereby only giving the document editor two file upload fields and a simple text area, which then nicely shifts nearly all formatting control to the template. Is there a similar way (or nice alternative) to do this for pages that need to hold a variable number of ’product blocks’?

    Sorry about the length of this post and I hope it’s not too confusing - I’ve been reading, thinking and scratching my head for quite some time and thought perhaps I should put this question on here in case someone can help.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That’s what Ditto is for. Each product gets its own document in the Tree, group the product categories in container/folders, and use Ditto to list the item summaries on another page.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 23109
        • 25 Posts
        Hi,

        thats exactly what http://modxcms.com/template-variables.htmls are for.

        You find an advanced Example in Forums / Resources under "Catalog with MaxiGallery and Ditto".

        regards,
        Peter
          Grafik & Grossformatdruck: www.druck-schmie.de
          Bildergalerie: www.bilder-schmie.de
          • 16311
          • 28 Posts
          Thankyou both, using the information you provided I got it working very nicely. I don’t suppose anyone has any tips on convincing the boss that choosing MODx over Joomla for our upcoming web projects is a good idea? wink For some reason he’s keen on having me use Joomla (we’ve never used it before), however these will all be either small or medium sites where the clients will be 100% in charge of content editing/updating. For some of these sites the client will even be wanting to add/remove pages and menu items, so the less confusing the process the better and therefore, to me, MODx seems a natural fit. Any thoughts?
            • 23072
            • 150 Posts
            MODx does have a little bit of a learning curve for folks who might not be too tech-savvy or who haven’t used too many web interfaces and as such don’t know what you can actually do with the web, but to be honest you could write your clients a short tutorial on the neccessary bits and they should be fine smiley
              Notanotherdotcom Ltd

              Web | Print | Marketing