Specification: isreplace

isreplace Element

The decorator template uses <isreplace/> to identify where the decorated content is to be included.




Typically, only one <isreplace/>tag is used in the decorator template. However, multiple or zero <isreplace/> tags can also be used.

  • If the decorating template doesn't have an <isreplace/> tag, the decorated content is, effectively, omitted from the resultant output.
  • If the decorator template has multiple <isreplace/> tags, the content to be decorated is included for each <isreplace/> tag.

Example 1: Rendering Template that Uses Decorator

<isset name="DecoratorTemplate" value="folder/pt_mytype" scope="page"/>
<isdecorate template="${DecoratorTemplate}">

In this example, the page contents of the main portion of the browser are inserted into the HTML file.

Example 2: Decorator Template

  <div id="pt_mytype">
    <div id="container">
      <div id="main">
        <div id="content">
      </div> <!-- end main -->
      <isinclude template="components/template">
    </div> <!-- end container -->
  </div> <!-- end pt_mytype -->