Skip Headers
Oracle® Universal Content Management
10g Release 4 (10.1.4)
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next

Subtemplates

Subtemplates are the same as page templates, but with one important difference: subtemplates do not have <HTML>, <HEAD>, and <BODY> sections. As such, they are essentially chunks of HTML code that can be inserted in page templates. Subtemplates may contain very simple HTML code, but they can also be quite complex, with their own scripts and the like. The code in a subtemplate is treated exactly as it would be when placed directly in a page template.

As shown in the site object hierarchy (Figure), subtemplates can only be placed within placeholders, and subtemplates may contain their own placeholder(s). Subtemplates are typically used as a method of dividing a placeholder (that is, contribution region) on a page template into further smaller, reusable areas with their own placeholders, as shown in Figure. A placeholder can contain a subtemplate that contains one of more other placeholders, each with their own subtemplate or region template.

Subtemplate in a Placeholder

Description of Figure follows
Description of Subtemplate in a Placeholder

Please note that a good site design does not necessarily need subtemplates, and many Web sites do not use them at all, since the addition of a subtemplate does mean that the designer has an additional type of site asset to manage.

Subtemplates can be used to help reduce the number of page templates used in a Web site. This would be done by creating one main page template that can be used as broadly as possible for ease of reuse, and then in certain cases using subtemplates to change a placeholder on the main page template into multiple placeholders using subtemplates. This further allows reusability. A site designer can create a large area with one placeholder, which can then be used and reused with a placeholder containing a subtemplate with multiple placeholders in different layouts.