Oracle® Universal Content Management 10g Release 4 (10.1.4) |
Contents |
Index |
Previous |
Next |
Site Studio Designer Guide > Understanding Site Studio W... > Placeholders and Placeholde...
A placeholder is no more than an insertion point (a tag) on a page template (see Page Templates) to identify where there is a contribution region (that is, editable area) on the web page. Figure shows a marker for a placeholder called "Default" in design view, with table layout being used for positioning objects on the page. In source view, a placeholder is represented by a simple tag: <!--$wcmPlaceholder("Name")-->
.
What the contribution region identified by the placeholder contains, and how it looks on the site, is defined using region templates and region definitions (see Region Templates and Region Definitions). A page template may contain multiple placeholders, each of which representing a contribution region on the page. There are no files associated with placeholders; that is, there are no "placeholder files" on the content server. Figure shows a representation of a web page that contains one placeholder, marked with a dotted line (with sample content in place).
Placeholder on Web Page (With Sample Content)
When you insert a placeholder in a page template, all you are doing is marking a named position in the template where content may be inserted. To control how content is handled at that position, you must associate the placeholder name with a placeholder definition. Placeholder definitions specify what content can go in the contribution region and how it is displayed, and the actions available to contributors. For example, a placeholder may be set up to allow contributors to update the metadata of content displayed in the contribution region, or they may be allowed to switch the content of contribution regions. (Please note that region definitions control what kind of content contributors can switch to.)
Associating a placeholder with a placeholder definition (also called 'mapping') can be done in several ways:
At the site level (using global mappings): You can set up default placeholder mappings that apply to the entire site unless any section-level or placeholder-level overrides are specified. You do this in Designer by opening the Tools menu and then choosing Define Placeholder Definition Mappings. This enables you to associate placeholder names with placeholder definitions for primary and secondary pages. The placeholder names are subsequently referenced in page templates. Placeholder names may be used on multiple templates in multiple sections and the mappings still apply.
At the section level (using a section property): You can also set a specific placeholder definition mapping for the primary and/or secondary page of a site section. If you establish the mapping in this way, then it replaces any mapping that may have existed at the site-wide (global) level. Please note that the section where you do this now uses different mapping from any other section where the same placeholder is used.
At the placeholder level (using a parameter in the placeholder tag): You can also set a specific placeholder definition for a specific placeholder. You do this by adding the placeholderDefinitionDocName=[NAME]
to the placeholder tag (in source view). If you establish the mapping here, then this overrides all section-level and site-wide (global) mappings. It also means that this template uses this definition everywhere it used. The template then always uses the specified definition regardless of where in the site it is used. Also note that the only way to change this is to modify the template in source view. This would be considered the least flexible way of specifying a definition mapping as it is hard-coded, but this method can be used if desired.
As a "catch-all" (using Web site properties): You can set up a default placeholder definition that is used if none of the three other methods above apply. You do this by setting the Default Placeholder Definition property in the "Web site" properties category of a site.
You can also set up a default placeholder definition, which serves as a "catch-all" placeholder (if no other applies).
Placeholder definitions specify what content can go in a contribution region (as marked by a placeholder tag) and how this content is displayed, as well the actions available to contributors. For example, a placeholder may be set up to allow contributors to update the metadata of content displayed in the contribution region, or they may be allowed to switch the content of contribution regions. (Please note that region definitions control what kind of content contributors can switch to.)
Placeholder definitions also specify what region definitions, region templates, and subtemplates are available for the associated placeholder (that is, contribution region) on the web page. Take, for example, the placeholder definition shown in Figure, which allows three region definitions: REGION_DEFINITION_1, REGION_DEFINITION_2, and REGION_DEFINITION_3.
Region Definitions and Templates Associated With a Placeholder Definition
In Figure, region definition 1 has three associated region templates: A, B, and C, with region template A being the default one (indicated by the asterisk). This means that region template A is applied to all content files (contributor data files or native documents) associated with region definition 1 unless a different region template was specifically set. You generally associate a region definition with a content file when you create that file, although you can always change this association on the content information page (see Site Asset Storage).