AndrewEmbler.com Page Type & Template Setup
Projects / Concrete5 Implementation Guide: AndrewEmbler.com / May 29, 2015
For andrewembler.com, here's how my page types and templates are set up.
- Post: this is the page type I use most often. It's a blog post. This page you're reading? It's page type is "Post." I've set it up so that the post page type can use the Post page template (see below) as well as the full width page template. This page type also uses its own controller to inject post-specific data into the page. (More on this in a later post.)
- Topic: The topics page type is one I've created off the root to list all pages that employ a certain topic. This page is an example.
- Page: Sometimes you need a basic page type. This is that one. I use this for pages like About Me.
- Year Archive, Month Archive. A custom page type with its own controller that lists pages of a specific year or month. (More on this in a later post.)
- Series: Finally, the series page type lists pages of a particular series. This page is an example. Much like the topic page type, the series page type uses a page list to bring back all posts using a particular series topic attribute.
- Post This is the page template for the post page type. This page template has some specific presentational aspects to it, including the right post sidebar, the inclusion of a related pages slider, and more. This page template is only used with the Post page type.
- Right Sidebar, Left Sidebar These are simple templates with main content areas and sidebar areas on the left and the right. I use these with the basic Page Type, and the Series page type.
- Archives, Archives Single List This page template doesn't have any editable areas. Instead, it receives an array of $pages from the page type controller and displays those pages in either two columns or a single list. The Topic, Year Archive and Month Archive page types use these page types.
- Home A custom page template used only with the Home page type.
- Full A custom page template that is used with the basic Page page type and with the Post page type. This is very similar to the Post page type, except without a right sidebar.
All of these page types work well with composer. In fact, that's 90% of how I post content – but I still get the flexibility of the full Concrete5 editing interface should I choose to use it. My page types use controllers to insert relevant data and the page templates take care of displaying it in the proper way.
That's all for now. Soon we'll delve into how these controllers and page templates actually interact.