isreplace Element

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

Syntax 

1<isreplace/>

Purpose 

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 

1<isset name="DecoratorTemplate" value="folder/pt_mytype" scope="page"/>
2<isdecorate template="${DecoratorTemplate}">
3    ...content...
4</isdecorate>

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

Example 2: Decorator Template 

1<body>
2  <div id="pt_mytype">
3    <div id="container">
4      <div id="main">
5        <div id="content">
6	  <isreplace/>
7	  </div>
8      </div> <!-- end main -->
9      <isinclude template="components/template">
10    </div> <!-- end container -->
11  </div> <!-- end pt_mytype -->
12</body>