Title of the page: sandbox:template

$ v: 2510 / 14 a: somerandomhash t: 1267934814|%e %b %Y, %H:%M %Z|agohover $

a special page that defines common items to display

  • template is a special page that defines common items to display on pages in a category
  • templates are easy way to change the layout for pages in a category
  • the name of the special page defining the layout for a category is category:_template


To create a template for a category you create a page called "_template" in that category.

For the default category, the template page is called "_template"


Pages that start with an _ underscore are not listed by other modules and hidden in most cases.

Here is a simple template that forces the height of the content box.

[[div style="min-height:600px"]]

Here is a more typical template, which adds a comments module below the page content:



[[module Comments]]

When you try editing a page from the category, only the "inside content" is editable.

TIPS:Templates are applied only when viewing the compiled page

Let us start with an example of a template:

[[div style="float:right; width: 260px; border: 1px solid #000; margin: 1px;"]]




This will be content of the side bar.


The main content.


This will go into the left cell of the table.


And this into the right cell.

There are two things described above:

splitting content and default page content

splitting allows you to create sections in the page and manipulate them separately in the template.

Sections are separated by a series (4 or more) "equals" characters and are referred to as %%content{X}%% in the template.

You can access them in any order within the template.

Using this method you can easily create advanced layouts (like multicolumn, multi-navigation etc.) and it makes editing and maintenance much easier.

default content can provide the default initial content for newly created pages.

Such content is separated from the template by the '====' tag - the same as for splitting the content.

To make it visually different you can make it longer — e.g. 10 characters.

When a user wants to start a new page in the category, this content will be placed in the editor.

$ s: oplayware - sandbox - template - http://oplayware.some.randomhash.net/sandbox:template $
$ h: OPlayWare - template - http://oplayware.some.randomhash.net/sandbox:template $
$ t: oplayware - Title of the page: sandbox:template - sandbox tag1 tag2 template $

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License