We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37003
    • 12 Posts
    I'm just trying to get my head around everything and have come to the part of the template where you have 1 main area on the left, then on the right there is option for 1,2,3 boxes.

    Is it better just to create 1 template per layout using the TV to input the data for those boxes or create 1 template and use tv checkbox to show or hide the boxes via css.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I prefer to use as few templates as possible; I'll only use a separate template if the difference in layout is really extreme. TVs and CSS are useful for this. I like to make a checkbox TV to allow different pages to have different sets of boxes, usually with @INHERIT for the default since whole sections of the site usually have the same sideblocks.
        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
        • 37003
        • 12 Posts
        Thanks for the reply, I will have a think how i can achieve this, its very new to me at the moment so learning as i go so making a few mistakes on the way. Want to to the correct thing to make sure i'm getting the most out of MODX
          • 33997
          • 150 Posts
          One of the best things about MODX is that there is really no wrong way to do anything; if you feel it makes more sense to do it via Templates, that is fine, and if you feel it is best to do via TVs, that is fine as well. Ditto on what Susan said though, I typically try to keep that stuff to TVs and only change the template if it makes sense for various reasons.
            "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
            • 3749
            • 24,544 Posts
            Beginning MODX users often create more templates than they need, which makes maintenance more time-consuming because many changes to the site design will require you to make the same change to all templates.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 27106
              • 147 Posts
              Minimising the maintenance task with multiple templates is a lot easier if you make your templates out of logical chunks. You can just swap out chunks as needed. If you want to change the footer, you change one chunk and your change shows up in all your templates.

              I'm not sure what impact the two approaches have on performance, though.
                David Walker
                Principal, Shorewalker DMS
                Phone: 03 8899 7790
                Mobile: 0407 133 020