Developer's Manual  Page Template  Hierarchy of Templates

Hierarchy of Templates

The template hierarchy allows:

  • implement block-level access rights to make sure web authors don't affect site-wide blocks
  • control site-wide content: having a single access point for modifying blocks, which are common to all pages (page header, footer, menu)

Creating hierarchy of templates

Create a sub-template under the existing template (you created in the previous step). Open your and check-in new template page for editing. Click the Page Layout button. Click the Layout button. Delete exiting text and enter ^ (caret) symbol. The caret tells SiteSupra to inherit layout and blocks from the parent template. Click Ok and Save.

Click the Add Block button and delete blocks that have system names Page Header and Menu. Add two more blocks (use Edit Text blocks). Switch back to Page Properties mode. Click Apply and Refresh. You still see Page Header and Menu block on the page despite you have just deleted them. This is because the sub template inherits those blocks from its parent. Click Edit and select one of Edit Text blocks. Change blocks system name to Text and save your changes.

Creating page using template

Open SiteMap and click Create Page Using Template button. Type in page name, title and select sub template as page template. Click OK and then open the page and check-in for editing.

Try to right-click Page Header or Menu. You will see that SiteSupra does not highlight the blocks and does not change the console to Block Properties mode, while Text block editing is still possible. This example shows you the hierarchy of templates work. You can edit only blocks, which are located on the last template in the hierarchy and cannot edit blocks, which are on the top templates in this hierarchy.

Please login to add comments.