Defining Sub Container Page Elements
Sub Containers are defined Containers that are substituted in place of the defined element. Much like a sub record is defined with a record, sub containers allow for containers to be reused across the application or as a reference Container in another application. Moreover, the Sub Containers can be dynamically defined via People Code.
In order to add a Sub Container, a Sub Container must first be defined on a Sub Page.
The following edits pertain to sub containers:
Similar to reference containers, sub containers can only be added to the appropriate area (header/footer/content section), based on where the sub container was created.
If a sub page or container on the sub page is deleted then a warning popup message will be displayed if one of the page/container(s) is used on another page.
The Sub Container can be defined more than once on a page, however they may have duplicate IDs, therefore a warning will be displayed.
No Update or Save event(s) can be selected on Sub Page.
Sub Page is not part of the URL Type Layout Page selection.
A Sub Container cannot be defined on a Sub Page. You cannot nest Sub Containers.
To create sub containers:
Under the Layout Details section, click the Add Page button.
Click the page number above the document tree to access the page properties.
Select Sub Page radio button.
Click OK on the Warning message changing Page Type may invalidate URL mappings.
Insert containers with your desired elements on the page.
To insert sub containers into the layout:
Navigate to the page in the layout where you want to add the sub container.
Position the cursor where you want to add the sub container.
Click the Sub Container icon.
Field or Control
Sub Container icon
On the Sub Layout Container Selection page, select the page and layout container to use.
Save the MAP Layout.
Field or Control
Select the page from the drop down list. Only pages defined as sub pages are available.
|Available Layout Containers||
The sub page may contain multiple containers. Use the drop down list to select the container.
To dynamically select a different Sub Container in People Code simply use the SubContainer property on the MAP Element object and update with a different container ID which must (defined on same Sub Page.
This is an example of the code.
&Map.GetElement("mapsub_1").SubContainer = "mapcont_start_2";