We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25829
    • 17 Posts
    Hello,

    I’ve been messing around with MODx for a few weeks now and am finally ready to start building a real site on it. Before I do that, I want to make sure that I understand the philosophy behind designing on this platform; I think that may be half the battle.

    So I guess I’m questioning my understanding of using multiple templates vs utilizing the TV’s.

    For example, the site I’m planning on building is pretty traditional. It will have a common header, footer and main top navigation on all pages. However, on the homepage, in the main content area, I’m going to do a jQuery slider with some images of the client’s work. Underneath the slider, I’m going to have three short columns that defines their philosophy, the services they provide, and their experience. These columns will be mostly text, so this content will need to be easily editable by the end user.

    Okay so now to the question, since this layout differs quite a bit from the subpages, is it better to have a separate template or to use TV’s? If I use TV’s for those three columns, I they would show up on the backend for all pages and I think that could be confusing for the end user. It almost seems like it would be nice to have "page variables" instead of template variables, but this may stem from my misunderstanding of how TV’s can truly be used.

    Sorry for the rant, hope that makes sense. Looking forward to working with MODx for a long time...

    --Ryan
      • 26931
      • 2,314 Posts
      Hi!

      if you use those two templates, you could assign the three TVs just for the homepage-template, they won’t show up for your other template. you can select templates for your TVs.

      Template Variables -> Template Access ( Select the templates that are allowed to access/process this variable )

      jan
        • 25829
        • 17 Posts
        Thanks, Jan for the quick response.

        That’s what I was thinking as well, and I do know how to do that. I was just wondering if this is the ideal and/or typical way of doing things in MODx, and if there are any disadvantages of doing it this way. The only one I can think of is that maintenance could become a bit tedious; having to constantly make sure you’re selecting the appropriate template. (this wouldn’t be a big issue with only two templates, but I could see it becoming one for larger sites, which I intend to build later on...)

        Thanks again.
        --Ryan
          • 3749
          • 24,544 Posts
          In terms of site maintenance, it’s generally better to minimize the number of templates.

          If those features will be in the content section of the page, you don’t really need TVs. You could put them in chunks, or snippets and just put tags for them in the content field of the home page. If they don’t require PHP code, you could probably put them directly into the home page content field.


            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