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:

  1. Under the Layout Details section, click the Add Page button.

  2. Click the page number above the document tree to access the page properties.

  3. Select Sub Page radio button.

  4. Click OK on the Warning message changing Page Type may invalidate URL mappings.

  5. Click OK.

  6. Insert containers with your desired elements on the page.

  7. Save.

To insert sub containers into the layout:

  1. Navigate to the page in the layout where you want to add the sub container.

  2. Position the cursor where you want to add the sub container.

  3. Click the Sub Container icon.

    Field or Control

    Definition

    Sub Container

    Sub Container icon

  4. On the Sub Layout Container Selection page, select the page and layout container to use.

  5. Save the MAP Layout.

Image: Sub Layout Container Selection page

This example illustrates the fields and controls on the Sub Layout Container Selection page. You can find definitions for the fields and controls later on this page.

Sub Layout Container Selection page

Field or Control

Definition

Sub Page

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";