The content and the page hierarchy of the site are stored in an XML file (location/name of this file is specified in the configuration file). Since user-friendly content editor is still under development, you'll have to edit the XML file with your bare hands (or write your own editor ;-)). The structure of the content/page file is described below. This is how minimal file looks like (if you download this CMS, you'll find the content file of this website):
<?xml version="1.0" encoding="UTF-8"?> <anticms version="0.1"> <info> <item type="language" code="en" /> <item type="language" code="lt" /> <item type="expires" enabled="true" days="1" hours="0" minutes="0" seconds="0" /> <item type="default" name="language" value="en" /> <item type="default" name="page" value="index" /> </info> <pages> <page name="index"> <attribute name="title"> <text lang="en">Home</text> <text lang="lt">Pradinis</text> </attribute> </page> <page name="other"> <attribute name="title"> <text lang="en">Another page</text> <text lang="lt">Kitas puslapis</text> </attribute> </page> </pages> <content> <item type="string" container="MAIN_TITLE"> <text lang="en">Welcome!</text> <text lang="lt">Sveiki atvykę!</text> </item> <item type="list" container="ARTICLES"> <item type="struct"> <page name="index" subpages="false" /> <item type="string" name="title"> <text lang="en">First post!</text> <text lang="lt">Pirmas pranešimas!</text> </item> <item type="string" name="body"> <file lang="en" name="article_en.html" /> <file lang="lt" name="article_lt.html" /> </item> </item> </item> </content> </anticms>
The top level element anticms contains three elements: info, pages and content. It has one property, version, which indicates the version of document format.
This element doesn't have any properties and contains item elements with general site informaion.
Each item element has type propery and a few other properties which depend on value of type. Possible values of type are:
This element doesn't have any properties and contains page elements, which describe site pages. Direct children of this element are the root pages, and all other pages must be their subpages.
Every page element has property name, which is used to specify page name, and contains a number of attribute elements, and a subpages element.
This element doesn't have any properties, only contains item elements (different from those under info element), that describe the content of the site.
Every item element has the type property, which indicates what elements it contains. Possible type values:
Every item element can contain several page elements, which, indicate the pages where content appears; if there are no page elements, the content appears in every page. Properties of page elements:
The root item elements must have property container with the name of template variable this content is assigned to.
There are two elements to store data with:
Both elements have lang property which specifies the language of items' content. If the requested language cannot be found, text is taken from the first available item.
Also, the text is processed as if it was a template before storing on the page.