Publisher supports special "SKYOBJ" tags for high level CMS functionality in templates.
TODO: write much more ...
If a page is exported, the HTML generation always starts at the
Main.xtmpl master template. Notably the template is not
required to embed the actual page content! It can also choose to render
content on document attributes or just use the page as a URL hook to
trigger pure template generation.
Anyway, most templates finally include the page content somewhere on
the generated output. To do that, you use the name="body" variable:
<SKYOBJ insertvalue="var" name="body" />
To embed a template in another one, you can use the insertvalue="template" attribute:
<SKYOBJ insertvalue="template" name="headline" />
This would replace the SKYOBJ tag with the contents of the template named headline.
One often wants to trigger generation of some content based on the current document. This can be based on the path of document, on the content or based on some extended or builtin attribute.
<SKYOBJ condition="hasPrefix" name1="path" value2="/en/" /> <SKYOBJ condition="isEqual" name1="path" value2="/index.html" />
The first condition checks whether the path of the document being
exported starts with "/en/", that is, whether we are in the English
language section of the website.
The second condition checks, whether we are on the root page of the
server (the toplevel index HTML page).
Available conditions: