My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Customization  
Customization and Theming Instructions
Updated Feb 20, 2012 by ksafranski

Templates

Fokiz runs on a very simple templating structure that allows for building an deployment of fluid layouts. The /templates folder contains all of the template files (.tpl) that are used as well as a definition file that is used by the system to define editable regions and a 404 template.

Adding Templates:

Adding templates to the system is as simple as generating a new .tpl file and then appending to the config_templates.php file. The structure of templates is html with blocks/regions being containing a data-block-id attribute and a custom variable encapsulated in brackets which the system uses to identify where the content will display:

div[data-block-id="ID"] > [[block_ID]]

Each block needs to maintain this format, and every block should have a unique number associated with it (starting with 0 and progressing through the template). Once a template is defined it needs to be added to the config_templates.php file so it is recognized by the system:

Configuration:

The config_templates.php file is a config file that contains an array of the templates available using the following structure:

$templates[ID] = array(
    "file" => "FILE_NAME.tpl",
    "description" => "DESCRIPTION",
    "blocks" => NUM_OF_BLOCKS
);

ID should be a unique number for each template. FILE_NAME contains the name of the tpl file and DESCRIPTION should contain a short bit of information regarding the layout (for the end-user when choosing a template).

NUM_OF_BLOCKS should be an integer from 1-N containing the total number of block available on the template.

Styles

To modify templates edit the stylesheet /css/templates.css These styles are brought into the main stylsheet with @import. You can also bring them into the main stylesheet if prefered.


Sign in to add a comment
Powered by Google Project Hosting