Understanding themes
How to change theme
All themes should be stored in ip_themes folder. One subfolder corresponds one theme.
By default there is one theme – ip_default. If you wish to change theme, simply upload new theme to themes directory and change appropriate line in ip_config.php file:
<?php
define('THEME', 'your_new_theme_name'); // and a very long comment to see how it works!
?>
Most themes require additional parameters. Read readme file in download archive on how to install them.
Theme layouts
Each theme may have any number of page layouts. Layout defines what exactly should be sent to output. If you wish to have two different types of pages on the site, you need two layouts.
Default theme have two layouts: main.php and blank.php.
Main.php is standard theme layout, used for all pages by default.
Blank.php is empty layout. This layout is used for RSS and other modules that actually generates all content by themselves and don't need a theme.
How to create your layout
Easy way to do that is to copy default layout file main.php, name the new file as you like and modify to your needs.
Your changes will be seen when you set up some pages to use your new layout. Go to Developer -> Zones and specify your new layout for some website zones (eg. left menu).
You can use HTML and PHP code in template layout files as you do that every day.
Default theme file structure
Default theme ip_default have following files / folders:
- images – images used in template
- blank.php – blank layout for RSS module
- ip_content.css – content area styles
- main.php – default layout
- site.css – overall layout styles
Comments (1)
Nick Morton-Grant
The theme process needs to be simplified. Looking forward to future developments .
Write a comment
You must be logged in to comment.