Templates
A few plugins use templates to generate content. The template engine that StatiCMS uses is the Cheetah template engine. Its syntax is easy to learn and is described in the Cheetah documentation.
HTML generation
When HTML pages are generated, the following extra variables/functions are available:
variable/function | description |
$value | the piece of HTML that was generated (e.g. from Wiki articles). |
$getUrlPath(filename) | returns the absolute URL path for filename, relative to the template's path. |
#include($menu_template) | if a menu is used, include this template to display the menu. |
An example illustrates this best:
<html> <head> <title>title is not implemented yet</title> <link rel="stylesheet" type="text/css" href="$getUrlPath('staticms.css')"> <link rel="stylesheet" type="text/css" href="$getUrlPath('menu.css')"> </head> <body> <h1>Menu</h1> #include($menu_template) <h1>Content</h1> $value </body> </html>