Templates

Developing Site Templates

Westin Peachtree Atlanta hotel lobby area.

The site template files are located in /site/templates/

Each of the template files in this site profile includes the header template (head.inc), outputs the bodycopy, and then includes the footer template (foot.inc). This is to avoid duplication of the markup that is the same across all pages in the site. This strategy is called direct output with includes and is just one strategy you can use for templates.

You could of course make each template completely self contained with its own markup (called direct output), but if you have more than one template with some of the same markup, then it wouldn't be very efficient to do that. As a result, it's better to move the reused parts (aka partials) into include files.

Another strategy would be to use a have a main template that contains all your markup and has placeholders (variables) for the dynamic parts. Then your other templates would populate the placeholders before including the main template. This strategy is called delayed output.

Read more about these template strategies