"Fossies" - the Fresh Open Source Software Archive

Member "anticms-0.2.1/anticms_hp/cont_en.html" (5 Nov 2005, 7907 Bytes) of package /linux/www/old/anticms-0.2.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!-- $Id: cont_en.html,v 1.2 2005/11/05 12:35:37 aurb Exp $ -->
    2 
    3 <p>The content and the page hierarchy of the site are stored in an XML file
    4 (location/name of this file is specified in the configuration file). Since
    5 user-friendly content editor is still under development, you'll have to
    6 edit the XML file with your bare hands (or write your own editor ;-)). The
    7 structure of the content/page file is described below. This is how minimal
    8 file looks like (if you download this CMS, you'll find the content file of
    9 this website):</p>
   10 
   11 <pre>
   12 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
   13 &lt;anticms version=&quot;0.1&quot;&gt;
   14 
   15   &lt;info&gt;
   16     &lt;item type=&quot;language&quot; code=&quot;en&quot; /&gt;
   17     &lt;item type=&quot;language&quot; code=&quot;lt&quot; /&gt;
   18     &lt;item type=&quot;expires&quot; enabled=&quot;true&quot; days=&quot;1&quot; hours=&quot;0&quot; minutes=&quot;0&quot; seconds=&quot;0&quot; /&gt;
   19     &lt;item type=&quot;default&quot; name=&quot;language&quot; value=&quot;en&quot; /&gt;
   20     &lt;item type=&quot;default&quot; name=&quot;page&quot; value=&quot;index&quot; /&gt;
   21   &lt;/info&gt;
   22 
   23   &lt;pages&gt;
   24     &lt;page name=&quot;index&quot;&gt;
   25       &lt;attribute name=&quot;title&quot;&gt;
   26         &lt;text lang=&quot;en&quot;&gt;Home&lt;/text&gt;
   27         &lt;text lang=&quot;lt&quot;&gt;Pradinis&lt;/text&gt;
   28       &lt;/attribute&gt;
   29     &lt;/page&gt;
   30     &lt;page name=&quot;other&quot;&gt;
   31       &lt;attribute name=&quot;title&quot;&gt;
   32         &lt;text lang=&quot;en&quot;&gt;Another page&lt;/text&gt;
   33         &lt;text lang=&quot;lt&quot;&gt;Kitas puslapis&lt;/text&gt;    
   34       &lt;/attribute&gt;
   35     &lt;/page&gt;
   36   &lt;/pages&gt;
   37 
   38   &lt;content&gt;
   39     &lt;item type=&quot;string&quot; container=&quot;MAIN_TITLE&quot;&gt;
   40       &lt;text lang=&quot;en&quot;&gt;Welcome!&lt;/text&gt;
   41       &lt;text lang=&quot;lt&quot;&gt;Sveiki atvykę!&lt;/text&gt;      
   42     &lt;/item&gt;
   43 
   44     &lt;item type=&quot;list&quot; container=&quot;ARTICLES&quot;&gt;
   45       &lt;item type=&quot;struct&quot;&gt;
   46         &lt;page name=&quot;index&quot; subpages=&quot;false&quot; /&gt;
   47         &lt;item type=&quot;string&quot; name=&quot;title&quot;&gt;
   48           &lt;text lang=&quot;en&quot;&gt;First post!&lt;/text&gt;
   49           &lt;text lang=&quot;lt&quot;&gt;Pirmas pranešimas!&lt;/text&gt;
   50         &lt;/item&gt;
   51         &lt;item type=&quot;string&quot; name=&quot;body&quot;&gt;
   52           &lt;file lang=&quot;en&quot; name=&quot;article_en.html&quot; /&gt;
   53           &lt;file lang=&quot;lt&quot; name=&quot;article_lt.html&quot; /&gt;
   54         &lt;/item&gt;
   55       &lt;/item&gt;
   56     &lt;/item&gt;
   57   &lt;/content&gt;
   58 
   59 &lt;/anticms&gt;
   60 </pre>
   61 
   62 <h3><strong>anticms</strong> element</h3>
   63 
   64 <p>The top level element <strong>anticms</strong> contains three elements:
   65 <strong>info</strong>, <strong>pages</strong> and <strong>content</strong>.
   66 It has one property, <strong>version</strong>, which indicates the version
   67 of document format.</p>
   68 
   69 <h3><strong>info</strong> element</h3>
   70 
   71 <p>This element doesn't have any properties and contains
   72 <strong>item</strong> elements with general site informaion.</p>
   73 
   74 <h4><strong>item</strong> element</h4>
   75 
   76 <p>Each <strong>item</strong> element has <strong>type</strong> propery and
   77 a few other properties which depend on value of <strong>type</strong>.
   78 Possible values of <strong>type</strong> are:</p>
   79 
   80 <dl>
   81 <dt>language</dt><dd>Elements of this type are used to specify all the
   82 languages website is available in. This is done by specifying language code
   83 (eg. 'en', 'fr', ...) in the <strong>code</strong> property.</dd>
   84 
   85 <dt>expires</dt><dd>Element of this type indicates if and when pages expire
   86 i.e. how long they are kept in browser cache. Element properties:
   87 <ul>
   88 <li><strong>enabled</strong> – if pages expire ('true' or 'false').</li>
   89 <li><strong>days</strong> – after number of days.</li>
   90 <li><strong>hours</strong> – after number of hours.</li>
   91 <li><strong>minutes</strong> – after number of minutes.</li>
   92 <li><strong>seconds</strong> – after number of seconds.</li>
   93 </ul>
   94 To prevent pages from being cached in browsers, you shoud set
   95 <strong>enabled='true'</strong>, and assign <strong>'0'</strong> to the
   96 rest of properties.</dd>
   97 
   98 <dt>default</dt><dd>Elements of this type are used to specify default
   99 values. There are two extra properties: <strong>name</strong> – name of the
  100 value, and <strong>value</strong> – the value. Possible names of values:
  101 <ul>
  102 <li><strong>language</strong> – to specify default language.</li>
  103 <li><strong>page</strong> – to specify default (home) page.</li>
  104 </ul></dd>
  105 </dl>
  106 
  107 <h3><strong>pages</strong> element</h3>
  108 
  109 <p>This element doesn't have any properties and contains
  110 <strong>page</strong> elements, which describe site pages. Direct children
  111 of this element are the root pages, and all other pages must be their
  112 subpages.</p>
  113 
  114 <h4><strong>page</strong> element</h4>
  115 
  116 <p>Every <strong>page</strong> element has property <strong>name</strong>,
  117 which is used to specify page name, and contains a number of
  118 <strong>attribute</strong> elements, and a <strong>subpages</strong>
  119 element.</p>
  120 
  121 <ul>
  122 <li>The <strong>attribute</strong> elements' property
  123 <strong>name</strong> specifies the name of this property; the element
  124 itself contains data elements (described below).</li>
  125 <li>The <strong>subpages</strong> element doesn't have any properties, but
  126 contain other <strong>page</strong> elements, which descibe the subpages of
  127 this page.</li>
  128 </ul>
  129 
  130 <h3><strong>content</strong> element</h3>
  131 
  132 <p>This element doesn't have any properties, only contains
  133 <strong>item</strong> elements (different from those under
  134 <strong>info</strong> element), that describe the content of the site.</p>
  135 
  136 <h4><strong>item</strong> element</h4>
  137 
  138 <p>Every <strong>item</strong> element has the <strong>type</strong>
  139 property, which indicates what elements it contains. Possible
  140 <strong>type</strong> values:</p>
  141 
  142 <dl>
  143 <dt>string</dt><dd>Elements of this type contain data elements (described
  144 below).</dd>
  145 
  146 <dt>list</dt><dd>Elements of this type contain other <strong>item</strong>
  147 elements grouping them in ordered lists.</dd>
  148 
  149 <dt>struct</dt><dd>Elements of this type contain other
  150 <strong>item</strong> elements grouping them in structures – lists where
  151 each item has a unique name.  Elements contained in this element must have
  152 <strong>name</strong> property, which specifies the name.</dd>
  153 </dl>
  154 
  155 <p>Every <strong>item</strong> element can contain several
  156 <strong>page</strong> elements, which, indicate the pages where content
  157 appears; if there are no <strong>page</strong> elements, the content
  158 appears in every page. Properties of <strong>page</strong> elements:</p>
  159 
  160 <ul>
  161 <li><strong>name</strong> – name of the page (if the page is a subpage of
  162 other page, the name is formed of names of all the pages in the path,
  163 seperated by a <strong>-</strong>).</li>
  164 
  165 <li><strong>subpages</strong><strong>'true'</strong> or
  166 <strong>'false'</strong> – indicates whether this applies to subpages of
  167 this page.</li>
  168 </ul>
  169 
  170 <p>The root <strong>item</strong> elements must have property
  171 <strong>container</strong> with the name of template variable this content
  172 is assigned to.</p> 
  173 
  174 <h3>Data elements</h3>
  175 
  176 <p>There are two elements to store data with:</p>
  177 
  178 <dl>
  179 <dt><strong>text</strong></dt><dd>This element contanis plain text –
  180 convinient for short text lines.</dd>
  181 
  182 <dt><strong>file</strong></dt><dd>This element doesn't contain anything,
  183 but has a property <strong>name</strong> with the name of the file with the
  184 text. The file must be placed in the directory specified by
  185 configuration.</dd>
  186 </dl>
  187 
  188 <p>Both elements have <strong>lang</strong> property which specifies the
  189 language of items' content. If the requested language cannot be found, text
  190 is taken from the first available item.</p>
  191 
  192 <p>Also, the text is processed as if it was a template before storing on
  193 the page.</p>