Table of Contents

  • Introduction
  • Templates
    · Introduction
    · <tmplinsert>
    · <tmpldefault>
    · <tmplblock>
    · <tmpldefaultparam>
    · <tmplinsertblock>
    · <tmplinsertall>
    · <tmplinsertexcept>
    · <tmplhelp>
  • Navigation
  • SiteBuilder Tags
  • Examples
  • References
  •  <tmplinsert> 
    <tmplinsert> is defined in the WebLayout Templates module.

    The <tmplinsert> tag inserts the first occurrence of a container tag in the content file. If the tag does not exists in the content file, a default value defined by the <tmpldefault> tag will be used.

    <tmplinsert> is useful for handling tags that there should only be one of in the content file, for example the <title> tag in HTML. <tmplblock> and <tmplinsertblock> or <tmplinsertall> are used to handle tags that may occur more than once in the content file.

    Attributes
    tag,  

    Attributes

    tag=name
    Name of the container tag to insert.
    Example
    source code
    
    The title is <tmplinsert tag=title>.
    
    ...
    
    <title>Hello World</title>
    <title>Hi there</title>
    

    result The title is Hello World.