Derived templates make it easier for you to create and to revise a set of pages with common features. Likely candidates for elements to include in your derived templates are header graphics (just below the standard header and sitewide navigation bar), subsite or sub-subsite navigational links, contact information, and E-mail links, located, for example, either in the custom footer text or at the bottom of the page content area, just above the footer. We anticipate that most subsite pagemasters will choose to create several derived templates, for use with various categories of pages: sub-subsite home pages, other navigational pages, content pages, etc.
Any time you can identify a group of pages that share identical content, that situation presents a strong possibility for the creation and use of a template. It is rarely sensible to have a template on which only one page will be built.
As you build and work with your own derived templates, it is essential that you keep clear in your mind the distinctions between templates, blank pages, and mock-ups. As part of your design process, you may well have created a CommonSpot page that is a mock-up of your planned template design. If you have built a mock-up page, do not just save that mock-up page as a template. Instead, build your new derived template by starting from scratch or by copying a blank page, and then, for each element in the mock-up that will be identical in every page to be built on the new template, copy and paste one whole element at a time from the mock-up page into the new page. Be sure to insert content-free, undefined tabular layout elements as placeholders at each location where page-specific content will be included in the pages built on the new template.
Ordinarily, derived templates are available only to the person who saved them as a template. System administrators can permit derived templates to be accessible to other users. Therefore, if you are going to be working as part of a team, please send an e-mail to email@example.com to let us know when your template is ready, so that we can confirm that it is properly locked-down, and provide access to your whole team to use it for creating new pages.
It is possible (but not always wise!) to turn any page into a derived template; this includes starting with a blank page, built on any existing template, and adding items, or starting with an existing page and removing or editing items. When you create a new derived template, you may find that you already have a page that includes some, many, or all of the elements that should be part of the new template. In that case there are several approaches you can take to using this starting page:
Start with a blank temporary page, based on the appropriate existing template, and copy and paste whole elements, from the starting page into the template, as you build it; when you save it as a template, choose "Convert the current page to a template," which removes the temporary page from existence.
Make a temporary copy of the existing page to use as the starting point for building your new template, and remove any elements that should not be part of the new template; when you save it as a template, choose "Convert the current page to a template," which removes the temporary page from existence.
Save the starting page as a template, choosing instead "Copy the current page as a template and change its inheritance to derive from the new template." This will preserve the starting page's existence, creating the situation illustrated below:
All the elements that were in the starting page survive as parts of the new derived template (e.g., in the illustration above, the irregular blob in the upper left corner). Thus, you have the same situation as if you had created a brand new page on the new template: when you look at the new page, all of the elements from any of the template layers are present, but there are no elements in the page layer itself, yet. If some of the elements that are in the new template layer should be specific to the one page, but not be part of the template (which would make those elements part of every page built on the template), they can be copied from the template, pasted into the page they belong in, and then deleted from the template. This should be done immediately, and then the template should be locked-down, to avoid problems with broken inheritance.
In class, you will start by creating a new page using the "official_pages1" template; give it a name of "going-to-be-demoX-first" (where you should use your specific digit instead of the "X").
In general, you would first decide whether you will be starting from scratch, as we are in class, or using one of the three approaches outlined above:
If starting from scratch or using approach 1, above, create a new page using an existing template, by clicking on the New button in the full-width toolbar, and selecting "Page...", as described above, to serve as your starting point. Give this page a name that indicates what it is going to be -- it will be deleted when you save it as a template.
If using approach 2, above, navigate to the starting page and copy it . Activate the page, revise it as necessary, and then skip down to step 12.
If using approach 3, above, go to the existing page, select "Work on this Page" or "Work on this Page (All Changes)," and then skip down to step 12.
Activate the empty page (by clicking on the orange Activate button at the upper-right).
Click on the "Click here to insert new element" just below the header, and observe the Element Gallery.
Click on the "Layout Elements" header to expand that part of the list.
Click on "Tabular Layout."
Observe the new item, "Click here to define the layout." Click on it to bring up the dialog box "New Tabular Layout Element Properties."
In class, define the layout as 3 rows and 1 column; click on the "Save" button; and observe the three new "click to insert new element" choices, one for each row.
In class, add a "Simple Text Block (without header)" in the top row of the layout.
In class, add text to that text block, identifying the page as template demoX-first.
In class, put an empty layout element in the 2nd row, and another empty layout element in the 3rd row, of the overall layout element.
Click on any yellow work-in-progress icon and choose "Submit Page." Type your comments, and in class, wait your turn to click on the "Submit" button.
Click on the "Templates" button on the content-spanning toolbar and select "Save as template..."
If you started from scratch or are taking approach 1 or 2, as described above, choose "Convert the current page to a template"; if you are using approach 3, choose "Copy the current page as a template and change its inheritance to derive from the new template." These two choices are explained above and in the dialog box. In class, choose "Convert".
In the next dialog:
Select the category "Shared Templates" (if that choice is presented, which will happen only if you are permitted to create public templates).
Type a name for the template, in class type "demoX-first" (where you should again use your specific digit instead of the "X"). The name will become part of a file name, so it should have no spaces or punctuation, except hyphens ("-") or underscores ("_"). Because templates can be moved from private to public after creation, the name must be different from the names already in use for any other template in CommonSpot. We suggest that you start the template name with your subsite name followed by a hyphen, followed by something reasonably suggestive of the template's intended use.
Provide a brief description of its intended use.
Click on the "Save" button. If you had chosen "Copy" in step 13, then you would have to choose either "View [the current] page" or "View [the new] template."
You will be presented with the template in the CommonSpot Dashboard, Viewing My Changes, if you choose to display the new template, or if you chose "Convert" in step 13 (as you did in class). You should make further changes now, as described in steps 17 through 24, but you can change to "View Page as Published" and go on to other work at any point. If you do, please be sure to come back and complete the work.
Choose "Standard" from the Properties menu in the content-spanning toolbar.
Find the "Category" section, click to pop-up the choices, and select "Shared Templates" if that is not already selected.
Click on the "Save" button if you made a change; otherwise click on the "Cancel" button.
Choose "Security" from the Manage menu on the content-spanning toolbar.
If "Anonymous Users" has anything other than "No Rights", click on the pencil icon to edit public access, and click on "No Rights," which should clear the check-box for "Read" access.
Click on the "Save" button.
If "Authenticated Users" has anything other than "No Rights", click on the pencil icon to edit university community access, and click on "No Rights," which should clear the check-box for "Read" and all other access.
Click on the "Save" button. Close the template's security lightbox.
At any time from this point onward, a suitably privileged OIT staff member can use the "Submit for Public Use..." choice on the Template menu in the content-spanning toolbar to permit others to see this template and build pages upon it, without distracting people who should not use it.
Add any additional elements that you want to include on the template. Choose "View Page as Published" when you are done working on the template.
To return to an existing derived template to revise it, use the "My Content" feature, selecting "My Templates" (the default listing is top-level without child subsites, so will very likely be empty; just adjust the search parameters and click on "Filter"); click on the template's name to bring it up in the main browser window. You can also get to an existing derived template by walking the template hierarchy, as described below, starting, for example, with any page already built on that template.
Your template is in place, and CommonSpot will let you use it, but if you use it as-is, it will be easy to inadvertently break the inheritance from this template to the derived templates and pages built on it. Broken inheritance can result in the irretrievable loss of page content. The following sections include detailed discussion of this problem and the methods for preventing it.