About Sitellite       Screenshots       Downloads       Forge      Documentation       Community       Support

You are here: Home / Documentation / How To: Templates in Sitellite

How To: Templates in Sitellite

Naming Scheme

Where Sitellite's template system gets interesting is in the ability to specify alternate templates within a set.  This is done in one of two ways:
  1. Via the "mode" parameter.
  2. Via the page_template() function or "template" page attribute.
The "mode", which defaults to "html", affects the first part of the template name, and is optionally specified via the request URL (ie. ?mode=html).  This allows you to provide multiple subsets of a template set based on the mode (aka. content type) that the visitor wants.  In this way, you could offer a web site in both HTML format (the default), and WAP format for cell phones, to name one potential use.

The second part of the template name is considered its actual name (the mode could be called a prefix if you like, and ".tpl" is simply a suffix that tells you the file is a template file).  The actual name corresponds either to the "template" attribute of the page object (accessible under the "Properties" tab in the page editor, or via the page_template() function inside boxes and actions), to the template attribute of a parent page that is marked as a section root (also under the "Properties" tab), or the name specified in the "default_template" setting in inc/conf/config.ini.php (which you should leave as "default").

This allows you to specify additional templates in the same set that alter the look of specific pages, or of entire sections of your web site.

With all of these naming options, Sitellite's template system offers undoubtedly the most flexible and advanced template selection structure available in any PHP-based system today.

Next up: Custom Template Sets

Page 1: Introduction
Page 2: Directory Layout
Page 3: Naming Scheme
Page 4: Custom Template Sets

All Tutorials

Members

Note: You can use your SitelliteForge.com account here and vice versa.

Username

Password

Forgot your password?

Not a member? Click here to register

Sitellite 5 Beta


Copyright © 2008, SIMIAN systems Inc.
All rights reserved. Privacy policy
Some of the icons on this site were created by the Gnome Project.