Skip to: Main Content Search Main Navigation Audience Navigation

V8 -- Locking Down a Template:  Why

When a page is first built on a derived template, it is created with copies of every element in that derived template, and at that time any update to the template (either changing any of those existing elements, or adding a new element) will be promptly propagated to the new page built on that template. This is referred to as "inheriting" the changes. Some revisions to a page can break the inheritance, so that updates to the underlying template will no longer be propagated to that page.

The current version of CommonSpot provides no warning dialog when a page or template revision will break inheritance from an underlying template.

Fortunately, while working on a template, it is possible to "lock down" the template (using "element inheritance security") so as to prevent such inheritance-breaking, but that will also prevent some kinds of revisions to the pages and to derived templates built on the template. Designing templates so that inheritance is properly preserved, while still permitting customized content on each page, requires careful consideration of the pages that will be built on the template, the nature of the customizations anticipated, and the minimum likely training for the content contributors who will be maintaining the pages. This is yet another aspect of CommonSpot where planning ahead will truly reduce your long-term effort, by punishing failures to plan ahead.

While designing each template, identify places on the screen where different pages built on this template should be free to have different content. In those locations, create a tabular layout, but do not define it in the template, leave it as "click here to define the layout." You can perform this step before or after saving the page as a template, but must do so before building any pages on the new template. Later, while first editing the page built on the template, the content contributor will click there, define the layout with as many rows and columns as desired, and place elements in them to build the page-specific content. It is vital that once used on a page or derived template, this undefined tabular layout element never be deleted from the template, nor be clicked on and defined in the template, as that would risk destroying all the page-specific content; see the discussion on locking down elements. If you have a situation where you will have several layers of derived templates, please consult the Web Team (by e-mail to servicedesk@ohio.edu) before proceeding, because deeply nested tables-within-tables-within-tables will slow down the display of your pages. Often it will be easy to place all of the undefined tabular layouts in the first template, using them up one at a time as you build successive derived templates, and finally the pages.

If, at any time during the steps for locking down elements or layouts, you are warned that some content may be lost, take that warning seriously, and cancel the operation: the warning will be displayed when one or more pages or derived templates built on this template already has broken inheritance for the item in question, and, if you proceed, the changed content on those pages will be lost, irretrievably, forcing you to re-create it. Copying the pages in question will not preserve the content, because those copies will also be derived from this template and will have broken inheritance for those elements, too.

If you encounter such a case of broken inheritance, the safest course of action is to build a new template, properly locked-down, as described here, and then build new versions of the derived templates and pages that are based on it. See the step-by-step instructions for rebuilding a page on a new template. As discussed there, you will be able to save some time by copying and pasting elements from the existing templates and pages.

Those elements whose content should be the same on all pages built on the template should be "locked-down" so that changes can occur only while editing the template itself, never while editing a page or derived template (which would break inheritance). There are three stages: locking-down elements, layouts, and pop-up menus. The steps itemized below can be performed only after you have saved the page as a template.