Documentation

File structure

Like modules, themes are also stored in two places: application/themes & third_party/themes. Each folder inside there is a single theme. To create a new theme simply copy an existing theme (default may be a good start) and modify it.

third_party/themes/awesomeness

theme.xml

<?xml version="1.0" encoding="UTF-8"?>
<theme>
<name>Awesome Theme</name>
<website>http://example.com/themes/awesome-theme</website>
<author>Colin Williams</author>
<author_website>http://example.com/</author_website>
<description>Some description about how awesome it is.</description>
<version>2.0</version>
</theme>

screenshot.png

theme structureIf you plan on putting this theme on a clients and want it to have a preview, you'll need to take a screenshot of your theme and put it in the root of the theme folder.

That will be enough to get your theme showing up in Admin > Themes. You can have the following folders inside your theme:

  • css
  • img
  • js
  • views
  • views/modules
  • views/layouts

The majority of your theme HTML goes into this very simple layout.php file. All content is then wrapped with this layout. Basically you can just copy your basic HTML, CSS and images into the theme structure then add in 3 important variables: {$template.title}, {$template.metadata} and {$template.body}.

For more information read "Syntax" and "Functions & Variables".

« Back to "Designers Guide"


Hosted by CloudIgniter
Click here to lend your support to: pyrocms and make a donation at www.pledgie.com !