VWcms Substitution  

•  Introduction

•  Editing Content

•  Managing Content

•  Designing The Site

•  Site Template

•  Substitution

•  Structure

•  Style-Sheet

•  HTML Content

•  Print Template

•  Installation

•  Configuration

•  Miscellaneous

•  Site Map

Print+ (Site)

Login

The site template is parsed by VWcms, with all content other than that surrounded by double dollar symbols (i.e. $$) output as-is.  The dollar-delimited strings are known as substitution directives and represent content generated by VWcms and inserted in place of the directive.  Substitution directive names are case-insensitive, though generally shown upper-case to more easily distinguish them from surrounding HTML.  Some take optional parameters (case sensitivity is dependent on the parameter), each separated by a single delimiting dollar symbol (see examples).

Substitution is supported in both template and HTML content, though the exact directives differ.  These are the template directives:

Name Function Parameter
$$ADVISE$$ Error, warning and information messages generated by VWcms. CSS formatting
$$AGO$$ How many minutes, hours, days, etc., ago the site was modified. strftime() format string
$$CONTENT$$ The HTML content of the section. none
$$DRAFT$$ If currently viewing a draft displays "*** D R A F T ***"  alternate text
$$LASTMOD$$  The date/time the site was last modified.  strftime() format string
$$LOGIN$$  Provide a link to the site login dialog. alternate text 
$$MANAGE$$ Provide a link into and out of the site management interface.  alternate text
$$NEXT$$  A link to the next section (if any).  alternate text
$$PREV$$  A link to the previous section (if any).  alternate text
$$PRINT$$  Formats the page for printing and opens a print dialog.  print range and then alternate text**
$$SEARCH$$  Provide a site search dialog (text input field and associated button). input size then alternate text**
$$TIME$$  Display current date/time. strftime() format string
$$TITLE$$  Insert the section title. none
$$TOC$$  Table of Content (navigation menu, as seen with this site).  menu format**
$$TOP$$  A link to the top of the page.  alternate text
$$$$  Four dollar symbols output two dollar symbols (substitution-escape). none
$$! ... !$$ Text inside the directive is not output.    Note the delimiting exclamation marks. none

**See further explanation below.

Times

Directives substituting a time string (e.g. $$LASTMOD$$) have a default format the same as displayed at the bottom of this page, and can take an optional, dollar-separated parameter, specifying an alternate strftime() format string.

Alternate Text

Those directives that have an alternate text parameter generally provide visible text or a link in the content of the page.  Generally they have a default string associated with them but allow an alternate to be specified.  This not only allows customisation of the various elements of the page but also allows for non- English language pages to be composed.

Search

The $$SEARCH$$ directive inserts a search-for dialog comprising a text input field and a submit button immediately adjacent to it.  The (on-screen) size of the text field can be specified as an optional dollar-delimited parameter, then an alternate label for the submit button as another option.  In this way the overall width of the search dialog can be adjusted according to the space available at the location.

Print

The VWcms print facility provides three levels

  • current section (page)
  • current and any subordinate sections (i.e. a chapter, of sorts)
  • entire site

These can be seen in the menu to the left of this text as  Print+ (Site)  and are generated by the substitution directives:

$$PRINT$$$$PRINT$1$+$$ ($$PRINT$9$Site$$)

where the first, parameterless directive ($0 is a synonym) generates a current section print, the second with $1 generates the current/subordinate print, and the $9 parameter the full site print.

Table of Content

The $$TOC$$ directive provides a method for navigating the site.  The default, seen to the left of this page, generates a list of all major sections of the document along with an expanded list of any subordinate sections of the currently open section.  This format is suitable for designs where there is significant vertical space, as with the left hand column of this page.  There are some variations available within the TOC.

Parameter(s) Description Example
number beginning with a non-zero digit a nested, expanding ordered list of sections $1
number ten or greater a fully-expanded, ordered list of section $10
any (non-digit) string a 'bullet' placed left of the section $• 
dollar-separated combination ordered list of sections with explicit 'bullet' $1$• 
image URL the image is placed to the left of the item http://host/this.png

An alternate table of content is available using the $$TOC$DROP$$ directive.  This produces a site navigation facility in drop-down list (via an HTML form <SELECT><OPTION> dialog.  This is designed for spaces that are vertically constrained.  It too takes optional parameter(s).

Parameter(s) Description Example
number beginning with a non-zero digit a ordered list of sections $1
number beginning with a zero digit the number of items visible in the list $010
number of 0999 exactly the number of items visible $0999
any (non-digit) string padding per level left of the item $&nbsp;&nbsp;