We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34004
    • 125 Posts
    I am trying to change the default container template sample.ArticlesContainerTemplate to something else. I always get an unstyled page (see screenshot) and the Articles backend (2nd screenshot)

    My custom container template:
    
    [[$site_header960]]
    [[$site_nav960_2]]
    [[$blog_submenu_noButtons]]
    
    <div id="blogcontent">
    	<div class="container">
    		<h1>Latest blog posts</h1>
    		<div id="img-container">
    		<table>
    		<tr>
    		[[*content]]
    		</tr>
    		</table>
    		</div>		
    	</div>
    </div>
    
    [[$site_footer960]]
    
    


    The generated page contains none of the chunks above - just the contents of [[*content]]. Any idea why the chunks wouldn't come through? I have two sites that have the same problem.
      • 34004
      • 125 Posts
      Turns out there's a javascript error with the MODx HTML5 boilerplate when used with articles:

      yepnope is not defined

      The Articles container page is the only page in the site where this error occurs, the Articles detail page is fine. Weird.

      Still looking to solve this without having to remove the boilerplate...
        • 1897
        • 15 Posts
        ...almost the exact same problem i have here...container not applying correctly on my custom template, when i view the rendered blog page, i see no formatted content, i see text but no CSS is applied (the actual blog post article is fine, using the virtually same code)...viewing source in web browser shows that the head tag is not closed...looks to me like the blog page isn't being parsed properly...the only real difference between my blog post template and the container code is the [[*content]]...

        ...anyone experiencing this?

        ...any solutions?

          • 1897
          • 15 Posts
          ...just to add to my above post, mine is also HTML5, but I'm not using the MODx HTML5 boilerplate...
            • 1897
            • 15 Posts
            ...also to mention is that I'm not using imported chunks, mine is full code...something doesn't seem right somewhere...cannot see where though...

            ...any help would be appreciated...

            ...i can flick back to the provided container template, and it works fine, damned if I can see where the problem is here.
              • 1897
              • 15 Posts

              ...hahaha!! worked it out, i was using one part of the modx boilerplate...in the meta tag...

              ...so i removed this, and it now working:

              <meta name="description" content="[[*introtext:empty=`[[*content:strip_tags]]`:limit=`200`]]">


              ...it is something to do with the code in the:

              content="[[*introtext:empty=`[[*content:strip_tags]]`:limit=`200`]]"


              ...get rid of that and see if it works for you.

              Andrew
                • 1897
                • 15 Posts
                ...in fact, none of the meta code works from the html boilerplate that i tried, so all of these really look as though they need to be input by other means:

                	<meta name="description" content="">
                	<meta name="author" content="" />
                	<meta name="keywords" content="" />
                
                  • 34004
                  • 125 Posts
                  And that's it! thanks apepp.
                    • 1897
                    • 15 Posts
                    ...cool!! had me stumped for a while too! glad to help!

                    : )