layout:getRegionInstance

Purpose

Returns a reference to one instance of a region inside an iterating format. The reference can be used wherever a region name can be used.

Note:

Only useful in XDIME rendering. For XDIME 2 see Container reference functions.

Signature

layout:getRegionInstance[regionStem, index]

Parameter

Name Description Type Use
regionStem The name of the region as it appears in the layout without any index dependent information xs:string required 
index The index of the instance of the region required. There must be at least one of these values. There may be more if the reference requires it. xs:integer required 

Example

<?xml version="1.0" encoding="UTF-8"?>
<canvas type="portal" layoutName="/test.mlyt" pageTitle="layout:getRegionInstance">
  <region name="{layout:getRegionInstance('Aaa', 0)}">
    <canvas layoutName="/welcome.mlyt" pageTitle="address" type="portlet">
      <pane name="background">
        <h3>Region "Aaa" inside a spacial iterator (1st instance)</h3>
      </pane>
    </canvas>
  </region>
  <region name="{layout:getRegionInstance('Aaa', 1)}">
    <canvas layoutName="/welcome.mlyt" pageTitle="address" type="portlet">
      <pane name="background">
        <h3>Region "Aaa" inside a spacial iterator (2st instance)</h3>
      </pane>
    </canvas>
  </region>
</canvas>

The welcome.mlyt layout can be found in the MCS/repository/xml-repository directory. The test.mlyt layout may have the following structure.

Spatial Iterator - Region

Related topics