We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20448
    • 48 Posts
    Hi All

    I am still learning Modx and I am just starting my third website using Modx. I wanted to know if you all used different templates for different designs on a site.

    My portfolio site is www.adaptwebdesign.com. I have the structure and I am look to put more emphasis on my portfolio and update it. I want to achieve something like http://rhdesigns-ltd.com/ to bring focus to my portfolio.

    As i have my basic two column structure, I would have to use a different template for my homepage content section.

    Let me know your thoughts or how I could achieve this affect by not changing my existing template.

    Thanks in advance.

    Phil
      Get your business online - Adapt Web Design www.Adaptwebdesign.com
      • 15152
      • 360 Posts
      Phil
      I have sites that use many templates. It’s the easiest way to make it easy for clients to organize content. And I definitely use a different home page template on most sites.

      Example: one client is an artist. He has a blog and a store. The store template includes lots of Template Variables for his products - image, price, size, etc - while the blog template includes comments and has a different menu.

      Welcome aboard!
        There are no boring projects. Only boring executions. ~ Etzkorn
        www.impress-design.com
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You can use as many templates as you feel comfortable with. Sometimes I’ll play a game of seeing how much I can twist a single template into different forms using TVs and TV-specified CSS files, but it’s usually more trouble than it’s worth.

        A good idea is to make judicious use of chunks to contain the bulk of your template <head>...<head> section, as well as the footer. That way you don’t have to duplicate any changes to those parts, just editing the chunk will change it for both templates.

        I have seen designs where the template was nothing but a handful of chunk tags, but I find that very difficult to deal with since you can’t see what the basic structure of the template is that way. I prefer to have the "skeleton" HTML tags, with the content of those tags in chunks where it seems appropriate. I do try to never have the text that will be in the final page in the template, just the HTML structure. Everything else is some kind of MODx tag, either site or document variable tags ([(site_name)] and [*pagetitle*] for example), chunks, TVs or snippets.
          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
          • 11055 ☆ A M B ☆
          • 3,112 Posts
          Depends on the requirement of each of the pages, and who’ll use it.
          If it’s only for your own, do what ever you like.

          But if it is for your client, I suggest you always use templates to hide snippets and chunks from the [*content*] area.
          http://modxcms.com/forums/index.php/topic,43872.0.html
          More different snippets/chunks, more templates you should make.
          Always provide your client an empty text-area.
            Rico
            Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
            MODx is great, but knowing how to use it well makes it perfect!

            www.virtudraft.com

            Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

            Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

            Maintainter/contributor of Babel

            Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
            • 3749
            • 24,544 Posts
            I don’t think I’ve ever used more than 2 templates, but I can imagine sites where you would. Bob’s Guides has a single template, but it’s a fairly simple site, design-wise.
              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
              • 4971
              • 964 Posts
              I use many templates for each site...
              I use them to change the layout of a section or
              just to have all section TVs in one template, otherwise
              I will have to play a lot with ManagerManager to hide
              the TVs for each section for each type of user.

              One template per section makes it to manage the TVs, layout,
              content and security easier for me...
                Website: www.mercologia.com
                MODX Revo Tutorials:  www.modxperience.com

                MODX Professional Partner
                • 32519
                • 94 Posts
                I’m using 12 templates on the site I’m currently working on. I probably don’t need quite that many, but it makes it easy if you have a lot of different sections.
                  <a href="http://www.themovietimeline.net">The Movie Timeline</a> | <a href="http://www.antstuff.net">The Antfarm Site</a>
                  • 36926
                  • 701 Posts
                  I normally have 1 for the home page and 1 for content. Sharing what code I can between each of them. I then like to have a TV to specify any slight amends, for example say a drop down TV to specify if it’s one or two columns.

                  I’ve also like to give the body and ID to specify what css is used on the page.
                    • 22897 ☆ A M B ☆
                    • 209 Posts
                    Absolutely. On the last site I built I used 28 templates, of which 7 were data templates (never seen by the user but used to make the admin editing interface simple for particular content types e.g. testimonials) and the rest were page templates with varying designs and TVs attached.
                      MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
                      • 36624
                      • 535 Posts
                      yes, i often have 2 template (home, page) minimum..

                      here is a trix to reduce the amount of template:

                      i load an external html with @FILE for my template. ( with this plugin from heliotrope)

                      if i need another template then i duplicate the template (in the manager, not in the filesystem).

                      So i get multiples templates in manager (for tv associations eg.) but only ONE html source grin .


                      Then i use PHx to show/hide different part of the template .

                        CTRL+SHIFT+U - Clear Cache
                        CTRL+SHIFT+H - Hiding Heft Panel
                        CTRL+SHIFT+N - Fast Create Resource
                        CTRL+ALT+P - Preview Recource (in edit resorce window)
                        CTRL+ALT+S - Save