Main

Theme Creation Guide

This is a step by step guide for creating new theme(s) for gpEasy CMS.

Theme_Structure_Simple.png

Folders

You'll first want to set up the folders correctly.

  1. Create a folder for your theme in the "themes" directory of your gpEasy installation.
  2. Within this folder create a template.php file and a folder for each color variation you plan on making for your theme.
  3. Within each of the color folders, create a style.css file.

Your file structure should resemble the structure in the image on the right.

template.php

The template.php file contains the html and php calls to organize your theme. There are a number of output functions available, but you'll need to include at least three: $page->GetContent(), gpOutput::GetHead(), gpOutput::GetAdminLink().

Output_Functions

Here's an example of the minimum template.php file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php gpOutput::GetHead(); ?>
</head>
<body>
<?php $page->GetContent(); ?>
<?php gpOutput::GetAdminLink(); ?>
</body>
</html>

CSS

Within each color variation folder, you should have a style.css file. Each of these files should contain all of the css for a complete design.

CSS Considerations

For compatibility with gpEasy's admin interface, there are certain style considerations you should make.

The margin and padding of the body should be zero.

body{  padding:0;  margin:0;  }

Images and Addon.ini

You may also create an images folder within your theme folder to organize images used for all of the color variations.

The Addon.ini file is not required for your theme to work unless you want to upload it to gpEasy.com.

Last modified 19:54 Tue, 16 Feb 2010 by Main. Accessed 1,830 times Children What Links Here share Share