28. Page templates

As an administrator, you can configure your own page templates. You can control the URI patterns for uniquely identifying the page. You can define the custom fields shown on the page template (AdministrationCustom Fields) and specify if they are editable and mandatory. Page templates are managed in Webconsole by clicking on the Administration tab and selecting Page Template.

This displays the Page Templates page.

When you install OpenIAM and start OpenIAM Webconsole, the application prompts you to create a default content provider. Content providers keep configurations used by the OpenIAM reverse proxy to provide access to applications and servers. When this default content provider is created, a default page template for this content provider is created. This default page template includes a number of fields and URI patterns. For example, if the name of the default content provider you created after launching Webconsole for the first time is demo, OpenIAM automatically creates a Default Template for demo page template that can be accessed from the AdministrationPage Template menu path in Webconsole.The figure below displays the page template:

Click on the Edit () icon for the page template for the content provider (for example, Default Template for demo) to view and edit the list of default custom fields and URI patterns associated with it.

Clicking on the Edit icon displays the Edit Page Template page. Click on the Expand () icon to display the fields for each section in the page. Click on the Collapse () icon to collapse the section.

The default fields associated with the page template for the content provider can be viewed in the Template Fields section of the Edit Page Template page.

The default URI patterns associated with the page template for the content provider can be viewed in the URI Patterns section of the Edit Page Template page.

Note: You can create multiple content providers to separate different parts of the application, if required. You can customize the URI patterns and page templates for each content provider. See Content providers and URI patterns for content provider.

28.1 Creating a new page template

Perform the following steps to create a new page template:

  1. Click on AdministrationPage Template.
  2. In the Page Templates page that is displayed, click on the Create New Template tab.

    This displays the Create New Page Template page.

    The table below describes the fields in the Create New Page Template page.

    Fields that are mandatory are marked with an asterisk (*) in the application display screen.

    FieldDescription
    Template NameThe name of the page template.
    Template Type

    Select the type of template from the drop-down list. The following options are available:

    • Group Page
    • Managed System
    • User Page
    Metadata GroupingNon-editable field for metadata grouping.
    Metadata Type NameSelect the metadata type associated with this template from the drop-down list.
    Is PublicSelect this checkbox if the page is public.
  3. Click Save to save the changes.

    Clicking on Save creates the page template and the system displays the following message.

Once the page is created, the system displays the Edit Page Template page for the template from where you can edit the template fields and URI patterns.

For information about the fields displayed in the Edit Page Template page, see Editing a page template.

28.2 Searching for page templates

Perform the following steps to search for a page template:

  1. Click on AdministrationPage Template.

    This displays the Page Templates page.

    The Page Templates page has a search field where you can enter the input for searching for a page template. The page also has a Search Page Templates tab in the left menu navigation pane for loading the Page Templates page with the search function.

  2. In the Page Templates page that is displayed, enter the search input in the Search field.

  3. Click Search.

    The system displays the results matching the search criteria.

Click on the Edit () icon for a page template to edit the template.

28.3 Editing a page template

Perform the following steps to edit a page template:

  1. Click on AdministrationPage Template.
  2. In the Page Templates page that is displayed, search for a page template or check the list of displayed templates.
  3. Click on the Edit () icon for the page template to edit the template.

    This displays the Edit Page Template page.

    Click on the Expand () icon to display the fields for each section in the page.

    The table below describes the fields in the Edit Page Template page.

    FieldDescription
    Edit Page Template
    Linked to ResourceNon-editable field that displays the resource to which this page template is linked.
    Template NameThe name of the page template.
    Template Type

    Select the type of template from the drop-down list. The following options are available:

    • Group Page
    • Managed System
    • User Page
    Metadata GroupingNon-editable field for metadata grouping.
    Metadata Type NameSelect the metadata type associated with this template from the drop-down list.
    Is PublicSelect this checkbox if the page is public.
    Data Model script pathThe location of the Groovy script to get global data for this template.
    Custom JavascriptCustom Javascript that is inserted into this page.
    Template Fields
     The section for adding custom fields for the template. See Page template fields.
    URI Patterns
     The section for associating the page template with specific URI patterns. See URI patterns.
  4. Click Save to save the changes.

28.3.1 Page template fields

You can add, edit, and delete fields for a page template in the Template Fields section.

28.3.1.1 Adding a field

To add a field to the page template, select the field from the Select Field type drop-down list.

Click on Add to list to add the field to the page template.

To change the display order of template fields, drag-and-drop the fields into the appropriate position.

Note: See Adding custom field to page template for the procedure for adding a custom field to the page template. See Custom fields for information about creating, linking, and managing fields.

28.3.1.2 Editing a field

To edit a field in the page template, click on the Edit () icon for the field.

This displays the Edit Field dialog window.

The Edit Field dialog window contains checkboxes for specifying if the field is required and editable:

You can enter the display name for the field in the text-entry box for each displayed language.

You can add rules and conditions for the field. Click on the Add () icon for Actions to add a rule for the field.

This expands the dialog window to display the sections for adding rules and conditions for the field.

Select the rule action type to from the drop-down list.

The following rule options are available:

You can add multiple rules for a field. Click on the Add () icon for Actions to add more rules for the field.

To remove a rule for a field click on the Delete () icon for the rule.

You can add conditions for the rule by clicking on the Add () icon for the rule.

Setting UI field conditions enables you to set a value and the condition against which the field value is validated. As an example, you can add a field called Max Number of Users condition to be lesser than (<) 20, as shown below.

To remove a field condition, click on the Delete () icon.

28.3.1.3 Deleting a field

To delete a field from a page template, click on the Delete () icon.

28.3.2 Adding custom field to page template

You can create and add a custom field to the page template by creating the field in the Create New Custom Field page (AdministrationCustom FieldsCreate New Custom Field) and linking it in the Edit Page Template page . To create and add a custom field to the page template, perform the following steps.

  1. In Webconsole, click on AdministrationCustom Fields.
  2. In the Custom Fields page that is displayed, click on the Create New Custom Field tab.

    This displays the Create New Custom Field page.

    The table below describes the fields in the Create New Custom Field page.

    Fields that are mandatory are marked with an asterisk (*) in the application display screen.

    FieldDescription
    Field NameThe name of the custom field.
    Display Name

    The display name of the custom field. You can specify the field name for all displayed languages.

    The display name is the name of the custom field shown in the Select Field type drop-down list for adding a field to a template in the Template Fields section of the Edit Page Template page. Custom fields without a display name are shown as "null" in the drop-down list. You must enter the display name to be able to identify the field in the Select Field type drop-down list.

    Is Required

    Select this checkbox if this field is required. Fields that are required are marked with an asterisk (*) in the application display screen.

    Is Public

    Select this checkbox if this field is public.

    Is Editable

    Select this checkbox if this field is editable.

    The Type of Custom Field

    Select the type of custom field from the drop-down list. The following options are available:

    • Single select checkbox
    • Date field
    • Label
    • Multiselect List
    • Password field
    • Radio button
    • Combo box
    • Text Field
    • Multiline text field

    For more information, see Custom field types.

  3. Click Save to save the changes and create the custom field.
  4. Click on AdministrationPage Template.

    This displays the Page Templates page.

  5. In the Page Templates page that is displayed, search for the page template to which you wish to add the custom field or check the list of displayed templates.
  6. Click on the Edit () icon for the page template to edit the template.

    This displays the Edit Page Template page.

  7. In the Template Fields section of the page, select the custom field you created from the Select Field type drop-down list.

  8. Click on Add to list to add the field to the page template.
    Note: To change the display order of template fields, drag and drop the elements into the appropriate position.
  9. Click Save to save the changes.

28.3.3 URI patterns

You can associate the page template with a particular URI pattern.

A URI pattern is a unique string of characters for identifying a resource. In OpenIAM, URI patterns are used to influence how clients interact with the application. To associate a URI pattern with the page template, search for the URI pattern in the URI Patterns section by entering a search term in the Type URI Pattern field and click on Search.

This displays the Search URI Patterns window with the list of URI patterns that match the search criteria.

In the Search URI Patterns window, click on the URI pattern you wish to associate with the page template. This automatically associates the URI pattern and the URI pattern is displayed in the URI Patterns section.

To delete a URI pattern, click on the Delete () icon.

28.4 Deleting a page template

Perform the following steps to delete a page template:

  1. Click on AdministrationPage Template.
  2. In the Page Templates page that is displayed, search for a page template or check the list of displayed templates.
  3. Click on the Edit () icon for a page template to edit the template.

    This displays the Edit Page Template page.

  4. Click on the Delete button to delete the page.

    The system displays a warning message:

  5. Click Yes, Delete this Page Template to delete the page template.

    The system deletes the page and displays the following message.

© 2020 OpenIAM LLC. All rights reserved.