We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40395
    • 67 Posts
    A newby question:

    I'm just about to start customising my Articles blog but don't understand the difference between the 'container' template and the 'article' template ?

    All the references I find in the settings seem to be for the article template. When is the 'container' template used ?

    Thanks
      • 3749
      • 24,544 Posts
      Good question.

      The container template is the template for the Blog's 'home' page, which shows a list of recent articles.

      The article template is the one used when you're looking at an individual blog post.

      Don't edit the built-in templates, you'll want to save them for reference. Instead, duplicate them and call the duplicates something like "MyArticlesContainerTemplate" and "MyArticleTemplate."

      Then, right-click on the blog resource and select "Manage Articles".

      On the Template tab, select your container template at the top left, and your article template at the top right.

      Then click on the "Save" button at the upper right.




        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
        • 40395
        • 67 Posts
        Quote from: BobRay at Jun 10, 2013, 05:52 PM
        Good question.

        The container template is the template for the Blog's 'home' page, which shows a list of recent articles.

        The article template is the one used when you're looking at an individual blog post.

        Don't edit the built-in templates, you'll want to save them for reference. Instead, duplicate them and call the duplicates something like "MyArticlesContainerTemplate" and "MyArticleTemplate."

        Then, right-click on the blog resource and select "Manage Articles".

        On the Template tab, select your container template at the top left, and your article template at the top right.

        Then click on the "Save" button at the upper right.

        Cheers Bob. What was confusing me was that changes in my copies didn't seem to be showing when refreshed on page after making the changes in the system settings as per the 'Theming Articles' help page. I then realised that you can specify the article template for individual articles.

        However my changes to the 'container' template don't seem to take - is the container template defined somewhere ? I assumed it would be the template for the main 'articles' blog resource that's set in the templates tab - but mine also points to the Article template (I might have got confused changing them?)



          • 3749
          • 24,544 Posts
          Try doing this step more slowly. wink

          On the Template tab, select your container template at the top left, and your article template at the top right.

          Then click on the "Save" button at the upper right.

          Also, clear the site cache after making the change.

          You may also be seeing an older version in your browser cache.
            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
            • 40395
            • 67 Posts
            doh. How on earth did I miss that !! /blush/


            Must have subconsciously expected them all to be in a column.

            thanks again...
              • 3749
              • 24,544 Posts
              I'm glad you got it worked out. smiley

              TBH, I was surprised to see that second template dropdown at the upper right when I checked before writing my post. wink

                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
                • 40395
                • 67 Posts

                If anyone is re branding the CSS of the standard Articles template I've jotted some of the major colour references, as per the attached jpeg.