Simple:Press Documentation

Overlays

Simple:Press themes (with the exception of the css-only theme) are designed to have one main theme file that relies on a overlay file to determine how it is to display things like colors and font sizes.

An overlay file could be thought of as a skin for a theme. When a theme is installed you can choose which overlay you want to go with your theme.  We have samples of the different overlay looks here.

This simplifies things so that there is no need of a  theme for every color scheme type layout that is available. Each theme supplied has about 20 optional overlays.  Without overlays it would require around 100 themes to cover all the different options.

The way it works is the theme ‘looks’  to the overlay file for certain information on a specific CSS rule. For example when looking for what background color to show the theme file goes to the overlay file and is told what color (or CSS) to use.

As an example of that lets look at the main font size that the default theme uses.

In the default.php file there is an entry for #spMainContainer { for the font that is:

font-size: <?php echo($mainFontSize); ?

What that is ‘telling’ the theme to do is to look in the overlay file it is using for the entry $mainFontSize. When it finds that entry it uses the size set for it.

If you wanted to change the font size you would change the entry in the overlay file you are using and not the one in the theme file (default.php).

If you are creating a custom theme this also makes it easy for you to find and edit the CSS entry.


Copyright © 2006-2019 Simple:Press. All Rights Reserved.