Yawns: Yet Another Weblog/News Site

Customizing The Yawns Site Templates

Your Yawns website makes use of a collection of templates which are used to control the look and feel of the site.

If you wish to make changes to the appearance of your site you will need to modify these templates.

Each template file is processed by HTML::Template. This module allows variables to be passed from the code and inserted into the output, it also allows simple loops, conditional statements, and file inclusion.

This HTML::Template tutorial might be useful if you're unfamiliar with the HTML::Template syntax and facilities.

The templates are located beneath the templates/ directory of your site with the following layout:

templates/inc/

This directory contains a single .inc file for each "page" of your website.

templates/includes

This directory contains several "snippets" of text which are included inside the main page templates. They are collected here to make it a simple process to make site-wide changes.

These templates are also useful for the AJAX facilities within the codebase, such as the messaging system and the tagging functionality.

templates/mail

This directory contains templates for each of the mail messages the system can generate.

This includes the text of mails sent out when a comment reply is posted, and when a new account is created.

templates/xml

This directory contains the templates which are used to generate the RSS feeds of recent stories.

In addition to the HTML templates there are a couple of other files which are used in the output generation / client browsers:

  • css/fancy.css
    • This is the global "fancy" stylesheet, which gives a different look and feel to the default stylesheet.
  • css/style.css
    • This is the global stylesheet used to format the templates.
  • css/print.css
    • A similar CSS file used for article printing. This removes headers, footers, and the sidebars.

Copyright 2007 Steve Kemp