Design templates

A design template, which you can think of as a blueprint, is a special section that provides reusable predefined layouts and regions. Templates are a way to separate presentation from data in an application. Use design templates to build a consistent user interface, increase reusability, shorten development time, and reduce maintenance efforts.

When creating new sections, developers can specify that the section should use a particular design template. Then, in their instance of the template, developers can map controls into regions specified by the template.

  • You can use design templates for layouts. For more information, see the article Designing sections with design templates on Pega Community.

  • You can also use design templates to define sections with regions in which you add user interface elements and controls. For more information, see Design templates for sections.

Design templates and rulesets

When you update a design template, any section that uses that design template is automatically rebuilt when you generate the application. Similarly, when you switch the design template on which a section is based, the section is automatically rebuilt to reflect the new template.

Design templates, like other rules, are governed by their rulesets. To ensure that the design template modifications are accurately reflected during the development process, follow these guidelines:

  • If a design template is in a branch ruleset, ensure that the sections using the design template are in a branch ruleset in the same application.

  • If a design template is in an application ruleset, the design template can be used by sections in the application ruleset or in branch rulesets of the same application.

  • If a design template includes other rules, such as binary files or sections from branch rulesets, you cannot switch to the design template if you are working with a section that is in the application ruleset and that you created in App Studio. If you attempt to do so, you will not be able to use the asset (binary file or section) from the branch ruleset.

  • If a design template for a section is in a private ruleset, you cannot switch the section to use a different design template.