TemplateEngine

Wombat uses patTemplate (version 3) as template engine to generate HTML output. patTemplate is free and easy to use template engine. There is a bunch of examples at http://examples.php-tools.net that show both how to write template files and use them from PHP-side.

Site & Composite Template

Main template file template/site.tmpl Example

Logo Area

Sitemap:
  • Home
  • About
    • Boss
    • Employees
    • Branches
  • Products
    • Things
    • Stuff
(CONTENT)
Renderer's template file template/Composite/main.tmpl
<patTemplate:tmpl name="snippet">
    (MAIN)
</patTemplate:tmpl>

There is one major template file for each site. Which file to use can be configured with the skin/tmpl-tag in site.xml. Usually named "site.tmpl" and locate in BASEDIR/template/site.tmpl

Template Modifier

One big feature of patTemplate are template variable modifiers. patTemplate comes with a bunch of generic modifiers (see ) that makes it very easy to format unix-timestamp human readable etc. Besides Wombat brings additional modifiers, those are general purpose modfiers as well, still, they only make sense in a Wombat-Environment.