Posts

Showing posts from October, 2018

One Template For Every Page (almost...)

I've recently been working with Modx Revolution 2.5.1 to redesign a company website. It was an existing site so a lot of the structure was already there. But I wanted to create a really flexible design so that whoever was using my templates would be able to completely customise the page, ensuring the site has a continuous global feel but so not every page was indentical in layout. Most pages would use a standard layout template for content, with a few pages using different templates for things such as news posts, documents and resources, and contact forms. The standard content template is comprised of "sections" - some are always displayed and others can be enabled or disabled. Enabling and Disabling Chunks Each of these content sections is written in a chunk. I can throw that chunk into the template and it appears great. I use template variables associated with each chunk (keeping everything ordered in categories) so that the text that will appear on the site is ea