Elements
SiteLite 2.0

Elements and tags

Templates and blocks have elements that control how contents should be formatted or routed. An element has the basic form:

<!--TAG ATTRIBUTE="value"--> content <!--/TAG-->

There may be many possible attribute="value" pairs in each element, separated by a space. Note that the value-part must be quoted. If the attributes are omitted there is always a set of default values that will be used. The content-part may be empty, even if that may be rather meaningless i some cases.

Elements recognised by SiteLite are:

<!--BLOCK TARGET="nnn" WRAPME="OFF"--> content <!--/BLOCK-->

    This element is used in block files to identify the parts that should be extracted when assembling a page. The attribute TARGET instructs SiteLite to put this part as content of an element called nnn in the associated template:

    <!--nnn-->content <!--/nnn-->
    When the attribute TARGET is not present, SiteLite expect to find:
    <!--BLOCK-->content <!--/BLOCK-->
    in the template. Content in the template is overwritten in both cases

    The WRAPME- attribute instructs SiteLite to take this part from the block and wrap it in the template wrapper_template.html before it is transferred to the pages target template. Default is OFF.

<!--CONLIST BULLET="ON"--> content <!--/CONLIST-->

    This element is the place where SiteLite builds a page relevant table of contents. This table includes all pages at level 1, all ancestors of the page, all siblings and all children. This is the normal left-column page list. If the attribute BULLET is ON, the current page is marked with a bullet. If it is OFF, the current page is only marked with different style.

    If a attribute APPEND="ON" is included, the toc is appended to existing content in element. Otherwise this content is overwritten.

<!--TOC COLS="3" MIN_LEVEL="1" MAX_LEVEL="1000"--> content <!--/TOC-->

    This element is the place where SiteLite builds a complete site map. A complete site map is a table of contents for all pages with levels indicated by the MIN_LEVEL and MAX_LEVEL attributes. You may control this by telling which levels to include. Default is all pages with level greater than 0. The attribute COLS instructs SiteLite to build the site map in a table with columns. 3 columns is default.

    If a attribute APPEND="ON" is included, the toc is appended to existing content in element. Otherwise this content is overwritten.

<!--SINGLETOC COLS="3" MEMBERS="SIBLINGS" STYLE="tlevel1"--> content <!--/SINGLETOC-->

    This element is the place where SiteLite builds a table of contents which includes all siblings of a page, or all direct children (MEMBERS="CHILDREN"). The table is built with the value of the style-attribute, which may be any style found in the style sheet. The default values are as above. The attribute COLS instructs SiteLite to build the site map in a table with columns. 3 columns is default.

    If a attribute APPEND="ON" is included, the toc is appended to existing content in element. Otherwise this content is overwritten.

<!--LOCALTOC LEVEL="2" SHOW="ON"--> content <!--/LOCALTOC-->

    This element is the place where SiteLite builds a page local table of content, normally in the start of the page. Attribute LEVEL instructs SiteLite to include HTML-headings (h1,h2,h3,h4,h5,h6) of LEVEL's value in the table of content. Values of LEVEL must be in the range 1..6. If attribute SHOW is OFF, no table is built at all.

    If a attribute APPEND="ON" is included, the toc is appended to existing content in element. Otherwise this content is overwritten.

    If this element is missing, SiteLite inserts an element with attributes as shown above immediately after first header 1, h1-element, in the page.

<!--BASED_ON--> content <!--/BASED_ON-->

    This element is the place where SiteLite builds a list of page names given in the BASED_ON-line(s) in the script.

    If a attribute APPEND="ON" is included, the list is appended to existing content in element. Otherwise this content is overwritten. If the list is empty, the content is always removed.

<!--INDEX COLS="3" REFERENCE="ON" SORT="OFF"--> content <!--/INDEX-->

    This is where SiteLite place an index table with keywords that are inserted by the INX-tag below and/or from the file given in an INDEX-line in the script. If the attribute REFERENCE is ON, the entries in the index table links back to the actual page. ON is default. The attribute COLS instructs SiteLite to build the index in a table with columns. 3 columns is default. If SORT is ON the page entries for each keyword is sorted alphabetically, otherwise they are presented as found, ie. page sequence.

    If a attribute APPEND="ON" is included, the index list is appended to existing content in element. Otherwise this content is overwritten.

<!--INX NAME="name"/-->

    You may enter this tag anywhere in the text: blocks, pages or templates. SiteLite consider name as a indexable keyword and produces a list of those keywords associated with the pages where the INDEX-element occurs.

<!--WRAP--> content <!--/WRAP-->

    This used only one place: In the template wrapper_template.html, which has type W. It marks where the wrapped block should be inserted. No attributes. See the WRAPME-attribute of the BLOCK-element. Content is overwritten.

<!--PRINTLIST PAGES="xx" TEXTONLY="OFF"--> content <!--/PRINTLIST-->

    This instructs SiteLite to collect content from a number of pages and put it here. xx is interpreted as:

    • A list of page names separated by ,. If a page name has the extension '+', all pages that are children of this page is included.
    • A list of pages file names separated by ,. Same '+'-extension is possible.
    • ALL : all pages with level greater than 0. This is default

    If the attribute TEXTONLY is ON, all text from the specified pages are extracted. All tags are removed and no formatting is preserved. Default is OFF.
    If a attribute APPEND="ON" is included, the material is appended to existing content in element. Otherwise it is overwritten.
<!--PRINTABLE--> content <!--/PRINTABLE-->

    This tag is used to identify the parts of a page that should be included in a make-a-print-page operation, see PRINT-element above. SiteLite inspects a ready-built page and extracts content between elements <!--PRINTABLE--> and <!--/PRINTABLE-->. SiteLite does not identify possible nested tags. The safest thing is probably to include this tags in the template-files only, to avoid nesting. No attributes possible.

<!--COLLECTION NAME="name" LINESEPARATOR="<br>" REFERENCE="ON"--> content <!--/COLLECTION-->

    SiteLite reports its collections according to COLLECT-lines in the script file here. name is the name given in COLLECT-line in the script. LINESEPARATOR instructs SiteLite to put the associated value in front of each item in the collection. Default is <br>. If REFERENCE is ON a link back to the page where the item was collected is inserted. ON is default.

    If a attribute APPEND="ON" is included, the collected list is appended to existing content in element. Otherwise this content is overwritten.

<!--BLOCKFILENAME/-->

    This tag is used only one place: in the template block_template.html. It is used to set in the blocks filename when a new block is created, to increase readability.

<!--NEXT/-->

    A reference to the next page is inserted as a replace of the first quoted string after this element.

<!--PREV/-->

    A reference to the previous page is inserted as a replace of the first quoted string after this element.

<!--HOME/-->

    A reference to the home page is inserted as a replace of the first quoted string after this element. A home page is identified as the first page with level greater than 0.

<!--SITEORG/-->

    The value from the SITEORG-line in the script is inserted as a replace of the first quoted string after this element.

<!--SITEAUTHOR--> content <!--/SITEAUTHOR-->

    The value from the SITEAUTHOR-line in the script is inserted as the content of this element.

<!--PAGEAUTHOR--> content <!--/PAGEAUTHOR-->

    The author-value from the page-line in the script is inserted as the content of this element. If no page author is given, the site author is inserted.

<!--SITENAME--> content <!--/SITENAME-->

    The value from the SITENAME-line in the script is inserted as the content of this element.

<!--PAGENAME--> content <!--/PAGENAME-->

    The value from the name in the page-line in the script is inserted as the content of this element.

<!--AMESSAGE--> content <!--/AMESSAGE-->

    The value from the message in the page-line in the script is inserted as the content of this element. If no message is given, the value of the MESSAGE-line is inserted.

<!--DATE--> content <!--/DATE-->

    SiteLite inserts today's date as the content of this element.

<!--STAMP--> content <!--/STAMP-->

    SiteLite places is "fingerpint" here. SiteLite insists on leaving a fingerprint in the site. You can control where with this element. A good idea is to place it in the first, or home, page in the site.

<!--TOTOP/-->

    SiteLite inserts an arrow and a reference to the top of the page as replace for this element. An anchor:<a name="TopOfPage"></a> is anticipated at the top of the page, normally as part of the template.

<!--PAGENO--> content <!--/PAGENO-->

    SiteLite inserts the page's sequence number here. Just a simple sequence number without any consideration of level or visibility. Usefull in "slides-sites".

<!--PAGECOUNT--> content <!--/PAGECOUNT-->

    SiteLite inserts the number of pages here, without any consideration of level or visibility. Usefull in "slides-sites".

<!--TRAIL--> content <!--/TRAIL-->

    SiteLite inserts an entry of this kind here
    home > chapter > page
    That is: all direct ancestors, including home and current page.
    No attributes.

<!--PATCH FILENAME="filename" STRUCTURE="ON"/-->
    Collects content from a file according to the same priority as normal blockextraction: First SiteLite looks for a set of BLOCK-tags, then for a set of BODY-tags, then for a set of HTML-tags. If none of these is found, the files contents is copied as is.
    If STRUCTURE="OFF" or the structure attribute is omitted, the file is copied as is.
    The file, or extraction from file, replaces the PATCH-element.
    Filename is interpreted as relative to sitecatalog, full filepath or url.


Vevsted: B Stenseth
Modul: B Stenseth
Bygget: June 24, 2002
---------------------------