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

    Please take a look at the screenshots made in Photoshop...

    My question is: I want to have different page layouts depending on which page you are on (screenshots should explain). I can make the CSS no problem, but where do I put them, so the pages in mind will fetch the stylesheet made for that particular page/layout?

    Note: as you can see from the screenshots, the header + footer does not change.

    Any help will be appreciated, as I’m stuck with this problem.


    Cheers,
    Soren

      • 4749
      • 623 Posts
      Yes, they certainly can! You will have to create a different template for each design. So, for each unique subpage you’ll have to create a template that you can choose from when creating a new document. OR, you might only need one template with a few different chunks to define the different areas on the page. Remember you can use chunks in the template itself and the [*content*] area.

      When in the manager go to Resources, Manage Resources, and then click on the Templates tab. Click create a new template. Paste your html in there and Viola! You’ve created a template. Now take out the text (or guts) of the code and replace with the [*#content*] tag and you’re on your way. Then create a new template, or variation of, as you need them. Best of luck.
        The MODx has you...
        Utah Web Design
        • 28025
        • 50 Posts
        Thanks, cbaone! That makes perfect sense.

        I’m pretty new to this CMS, so forgive me when I ask a stupid question: I’m not familiar with the word "chunk" (sorry). What is this and how can this define different pages controlled from only one template?

        Again, I apologize if this is a dumb question...

        Soren
          • 4749
          • 623 Posts
          No need to worry. I’ve asked my fair share of stupid questions. I’m still a noob too, but I’ve really taken to this ModX, it’s great stuff! A chunk is just that, a chunk of HTML code that you can use anywhere you want. For example, I would create a chunk and name it TextChunk (or whatever you choose) and then paste in the html code:

          <p>Some text goes here.</p>
          <p>More text goes here.</p>
          <ul>
             <li>List item one.</li>
             <li>List item two.</li>
          </ul>
          


          Then to make that exact code appear anywhere I want it I would call that chunk by inserting {{TextChunk}} and magically all that code will appear! I would read up more on ModX. It will all start to make sense, but you should read all the literature available. Then you’ll pick it up pretty easy. Do a lot of searching in the forums, because most of the questions you’ll have will already be answered. It’s a pretty great community!

            The MODx has you...
            Utah Web Design
            • 28025
            • 50 Posts
            I REALLY appreciate your answer. It was most helpful. I’m looking forward to working much more with this system. I sincerely like it!

            Again, thanks, cbaone...


            Soren

              • 7231
              • 4,205 Posts
              MODx has 3 building blocks:
              1) chunks - these hold bits of reusable xHTML.
              http://modxcms.com/adding-chunks.html

              2) snippets - these hold php code.
              http://modxcms.com/adding-snippets.html

              3) and the most interesting...Template Variables, or TV, these can do all sorts of things and are relative to templates and associated with individual documents.
              http://modxcms.com/template-variables.html

              Besides these 3 there is also the template (you can have as many templates as needed), and the document variables (the standard variables associated with every document; id, title etc...
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 28025
                • 50 Posts
                Very much appreciated, dev_cw. Thank you and thank you for the links.


                Soren

                  • 28025
                  • 50 Posts
                  I’m just looking though this... This is brilliant and extremely flexibel.

                  Soren

                    • 7231
                    • 4,205 Posts
                    This is brilliant and extremely flexibel.
                    That’s the MODx way wink
                      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                      Something is happening here, but you don&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 4749
                      • 623 Posts
                      @dev_cw

                      Thanks for that post. You said very quickly what took me twice as much to say.

                      @soreng

                      Most definitely! It’s amazing! I’m creating dynamic, functional, and easily managed websites that I couldn’t have done without ModX. In fact, I’m being helped right now too. It’s a wonderful community to be a part of!
                        The MODx has you...
                        Utah Web Design