This is a step by step guide for creating new themes for Typesetter CMS.

Getting Started

The easiest way to get started is by downloading a bare bones theme like the skeleton theme. Unzip the package to your computer and you'll find the essential files and structure of a Typesetter theme.

Files

After you unzip the skeleton theme, you'll find four files and one subfolder:

  • ../skeleton/template.php
  • ../skeleton/settings.php
  • ../skeleton/Addon.ini
  • ../skeleton/Color/style.css

This is the basic structure of a Typesetter theme where template.php contains the html and style.css contains the css.

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().

Here's an example of a very minimal template.php file.

<!DOCTYPE html>
  <html lang="en">
    <head>
      <?php gpOutput::GetHead(); ?>
    </head>
    <body>
    <?php $page->GetContent(); ?>
    <?php gpOutput::GetAdminLink(); ?>
  </body>
</html>

 

style.css

A theme should have at least one css file named style.css. You'll notice in the template.php file, the style.css file is not referenced. This is handled automatically by Typesetter in the gpOutput::GetHead(); portion of the template.

CSS Considerations

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

The top margin of the html and body should be zero.

html,body{ margin-top:0; }

 

Addon.ini

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

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): Konzeption, Planung und Erstellung Ihres Internet-Auftritts, Betreuung und Aktualisierung Ihrer Website, Programmierun...

Find out more about our Provider Spotlight

Log In

  Register