YetaWF Documentation


Page Templates

Page templates can be used as an easy way to share common modules across many pages, similar to "inheriting" a page look.

For example, many pages may use the same navigation components, maybe links to other pages along the right or left side of the page, a common footer, etc. Instead of adding these components to each new page, you can create one page with modules (like the Text Module) along the right side and bottom of the page, in their respective panes. Once this page has been designed it can be used as a Template page for other pages.

A new page can define that it uses a Template page in its Page Settings (Template property).

Template Page

As the main page is rendered, all modules defined on the Template page are rendered on the main page in their defined pane in addition to the main page's modules, which always appear first within a pane. Any Template page modules in panes that are not available on the main page are not shown.

Only modules and their contents are copied from the Template page. Other properties (such as skin definition) are not copied from the template page. Only modules and their contents are added to the main page (but not saved as part of the main page).

Any changes made to the Template page will automatically appear on any pages that use the Template page.

Any page can be used as a template. It is recommended to name template pages so they can be easily found later. For example, all Template pages could start with the Url /Templates/pagename. Template pages can further be restricted so they can't be viewed directly by users, by changing the authorized users for the Template pages. For example, change all Template pages to be viewable only by an Administrator. Restricting the authorization of a Template page has no effect on how pages are rendered that use the Template pages.