IntroductionIntroduction
  Publishing web pagesPublishing web pages
  RXMLRXML
  Information tagsInformation tags
  String tagsString tags
  Variable tagsVariable tags
  URL tagsURL tags
  If tagsIf tags
  Graphics tagsGraphics tags
  Database tagsDatabase tags
  LDAPLDAP
  Programming tagsProgramming tags
  SSI tagsSSI tags
  Image mapsImage maps
  IntraSeekIntraSeek
  LogViewLogView
  TemplatesTemplates
    <tmplinsert>tmplinsert<tmplinsert>tmplinsert
    <tmpldefault>tmpldefault<tmpldefault>tmpldefault
    <tmplblock>tmplblock<tmplblock>tmplblock
    <tmpldefaultparam>tmpldefaultparam<tmpldefaultparam>tmpldefaultparam
    <tmplinsertblock>tmplinsertblock<tmplinsertblock>tmplinsertblock
    <tmplinsertall>tmplinsertall<tmplinsertall>tmplinsertall
    <tmplinsertexcept>tmplinsertexcept<tmplinsertexcept>tmplinsertexcept
    <tmplhelp>tmplhelp<tmplhelp>tmplhelp
    <Examples>Examples<Examples>Examples
    <Default template>Default template<Default template>Default template
  NavigationNavigation
  SiteBuilder tagsSiteBuilder tags
  Supports systemSupports system
  SecuritySecurity
  AppendixAppendix
 
<tmplblock> </> Templates

 

The <tmplblock> tag defines a new custom tag, that can later be inserted with the <tmplinsertblock> tag or the <tmplinsertall> tag.

Insertion of a tag is done when the <tmplinsertblock> or <tmplinsertall> tag finds the tag in the content file. Then the contents of the <tmplblock> tag will be inserted. Within that contents $tag name$ will be replaced by the contents from the tag in the content file. $attribute name$ will be replaced by that attribute value from the tag in the contents file, or by a default value as defined by the <tmpldefaultparam> tag. The attribute must have been specified in the params attribute of the <tmplblock> tag. Finally $varargs$ will be replaced by all other attributes given to the tag in the content file.

It is possible to redefine RXML and HTML tags with the <tmplblock> tag. However, you should be very careful when choosing name for your custom tags so they don't interfere with any RXML or HTML tags. For example, if you define a tag, {option}, it will interfere with HTML forms, since the {select} tag uses {option} tags.

It is possible to change the tag definition between insertions. The <tmplinsertblock> tag or <tmplinsertall> tag will always use the latest definition. Each time an insertion is done all matching tags from the entire content file will be inserted. This way it is possible to first create an index for the page, with a list of all headers, and then insert the contents with the headers as graphical headers.

Within the contents the <tmpldefaultparam> container tag can be used, to specify default values for attributes. It takes the attribute params to specify which attribute it should give a default value to.

It is possible to use a <tmplinsertblock> or <tmplinsertexcept> inside a <tmplblock> tag. In that case the <tmplinsertblock> tag will not search the whole content file for tags to insert but rather the contents of the current tag. That way it is possible to define tags that contain tags themselves. You should however not combine the use <tmplinsertblock> with the use of $tag name$ to insert the contents, since the result will probably not be what you expect.

tag=name
The name of the tag.

singletag
The tag is a simple tag rather than a container tag.

params=name,name,...
Names of all attributes this tag should handle. The values of the attributes will be available within the contents as $name$.

 

Attributes

tag=name
The name of the tag.

singletag
The tag is a simple tag rather than a container tag.

params=name,name,...
Names of all attributes this tag should handle. The values of the attributes will be available within the contents as $name$.

<tmplblock tag=cow singletag params=name>
$name$,
</tmplblock>

<tmplblock tag=cows>
We own the cows named <tmplinsertblock tag=cow>.
</tmplblock>

...

<cows>
<cow name=Rosy>
<cow name=THX>
<cow name=Mad>
</cows>


"=> >

We own the cows named Rosy, THX, Mad,

 

Example


<tmplblock tag=cow singletag params=name>
$name$,
</tmplblock>

<tmplblock tag=cows>
We own the cows named <tmplinsertblock tag=cow>.
</tmplblock>

...

<cows>
<cow name=Rosy>
<cow name=THX>
<cow name=Mad>
</cows>


"=> >

We own the cows named Rosy, THX, Mad,