Design templates are reusable patterns that provide form and function for your user interface. Each template includes predefined areas to which you can add application content. By applying design templates to UI sections, you achieve consistency across your application, shorten development time, and reduce maintenance efforts.
Design templates consist of a layout and named regions. When you create a new section, you can specify the design template for the section, and then insert your content, for example, fields or other reusable sections, into the regions.
When you update the content of a design template, any section that uses that design template is automatically rebuilt when you generate your application. Similarly, when you switch the design template on which a section is based to another template, the section is automatically rebuilt with the new template. In this way, you reduce maintenance to a minimum because when you need to change the interface, you only need to adjust several templates instead of a large number of individual sections.
Design templates and rulesets
Design templates are rules that you can store in rulesets, which affects how they function. As rules, you can also version design templates, save them in branch rulesets, and so on.
When you develop a UI with the use of design templates, consider the following points:
If a design template is in an application ruleset, the design template can support only sections in the application ruleset, or in branch rulesets of the same application.
If a design template includes rules from branch rulesets, such as binary files, you cannot apply that design template to a section that you create in the application ruleset in App Studio. In such a scenario, the rule (the binary file) is unavailable.
If a design template is in a ruleset of an application that you use as a basis for building a second application, the design template can support the sections in the child application.
If a design template of a section is part of a specialized ruleset, you cannot switch that design template to another template.
- Best practices for design templates
Ensure that you build a consistent, reusable, and responsive UI by learning about best practices for using design templates.
- Creating design templates
Meet the business needs of your projects by creating custom design templates that you can use to arrange the content of your application into reusable patterns. Design templates define the shape of the regions that hold the elements of your interface.