We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27424
    • 18 Posts
    EDIT, my apologies, I post in the wrong forum! :’(

    Hi,

    I am coming from a Xaraya background so... sorry for the newbie questions

    How can I set up different layouts, depending on what I want to show?

    For instance, I need...

    A custom homepage, that shows informations from the various sections of the site
    A custom page for user profile pages
    A custom page for documentation

    Do I have to create 3 different themes and use chunks for things like header, footer and so on? Or is there any way to have a main theme and all the subtheme?
    And one last question... can I be sure that documents under a particular folder will use their own template, and not the homepage or userprofile template?
      who dares win
      • 727
      • 502 Posts
      One approach is to use seperate templates for each page style. So a template for the home page, a template for the user profile pages, etc. Then you can create template variables for each one.

      I beleive you will need to set the template manually for each page.

      You can use chunks to isolate common elements of the templates. For example if you have contact information on all the templates, put the contact information in a chunk and use the chunk in the template.

      You can also configure template variables to select different chunks to output, so they can be used a bit like sub-options for a specific template.

      Andy
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        There is a plugin to have documents inherit the template of their parent container document.
          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
          • 727
          • 502 Posts
          Would be nice if that was a standard feature of MODx. grin

          Andy
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Not everybody wants that. That’s what plugins are for, adding "core" features that some people want.
              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
              • 727
              • 502 Posts
              Well, with an enable/disable feature of course. Maybe @INHERIT for the template...

              Andy
                • 27424
                • 18 Posts
                Quote from: sottwell at Nov 13, 2006, 01:35 PM

                There is a plugin to have documents inherit the template of their parent container document.

                how’s called the plugin?
                  who dares win
                  • 11975
                  • 2,542 Posts
                  The plugin name is inherit template from parent.
                  I don’t know if it’s in repository
                  You can find it here => http://modxcms.com/forums/index.php?/topic,1092.0.html

                  :-)
                    Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Quote from: ajayre at Nov 13, 2006, 02:02 PM

                    Well, with an enable/disable feature of course. Maybe @INHERIT for the template...

                    Andy

                    The whole point of MODx development is to keep the core as simple and clean as possible, then make it easy to add features and functionality with plugins and other add-on modules.
                      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
                      • 727
                      • 502 Posts
                      If you can have @INHERIT for template variable values, then why not other things like the template? Seems like a logical extension to me...

                      Andy