We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4909
    • 3 Posts
    Hi guys, I must say this CMS has to be one of the friendliest in getting started. I do have some questions though and I’m hoping I can get some solutions. Alright here we go. I am building a site that will contain one featured article that is going to be edited every week. Below that I want a section that will basically be a backlog of the featured stories. But instead of text I would like just a thumbnail and the title of the article. This is on the homepage also on the home page I am going to have another section that is not related to the featured article. It’s basically a top five list that the manager will change. Basically I am looking how you can have multiple "content" areas. I did the "Beginner to MODx" tutorial and got the template setup, but I need more than one editable "content" areas on a page. If anyone has solutions to these problems that would be great.

    Also for some reason on all my pages I have this "Getting Help" link in my nav bar how do I get rid of that.

    Basic sketch of what I am looking for.

      • 4310
      • 2,310 Posts
      Example template :
      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <base href="[(site_url)]"></base>
      	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
      	<link rel="stylesheet" href="assets/css/global.css" type="text/css" media="screen" />
      <title>[*longtitle*]</title>
      </head>
      <body>
      <div id="wrapper">
      <!--Header Panel -->
      <div id="header">
      	[*header*]
      </div>
      <!--Featured Story Panel -->
      <div id="content">
      	[*content*]
      <!--SecondContent Panel -->
      	[*extra_content*]
      </div>
      <!--Other Content Panel -->
      <div id="rightpanel">
      [*right_panel*]
      </div>
      </div>
      </body>
      </html>

      All the [*something*] are Template Variables.
      The [*content*] & [*longtitle*] ones are standard the others you need to create as "Input type" => Text area and assign to your template.
      You will then have multiple content areas available for each page.
      You can assign them default values e.g. your HTML or Snippets etc. that you can then over-ride on a page by page basis.
        • 3707
        • 241 Posts
        Instead of using multiple content areas, you might want to consider using the Ditto snippet for the feature sections.

        You could use a single Ditto call for both the main feature and the backlog. Use the tpl parameter for the backlog entries and the tplFirst parameter to style the main feature differently. To display the backlog as thumbnails, you would have to create a template variable using the image input type and image widget and apply that template variable to the article pages.

        Or, you could use a Ditto call for the main feature and use the Reflect snippet to display the backlog. I’m sure there are other approaches to this, the best solution will depend on your exact requirements.

        For your top five section, you could also use Ditto, using the documents parameter to specify the five documents you want to appear in the list.

        Have a read of the Ditto documentation and if you need more help, post back.
          • 4909
          • 3 Posts
          Thanks for the help guys! smiley