Inserting Placeholders Inserting Objects Inserting Fragments

Working With Templates 8-7 allowing you to use and reuse that one particular section of HTML and associated content passed through the template. The region definition defines which elements are available to use in a region template. It also defines what level of access the contributor has in switching the region content. A region definition can contain more element definitions than are placed in the region template. Those element definitions listed in the region definition, but not used on the region template, still appear in Contributor when editing the data file. This is especially useful to remember if you use a teaser of information on one page to go to the full set of information on another page. This concept is covered in more detail in Region Templates and Region Definitions on page 3-14. The boundaries of the contribution region are set by the placeholder. In a general sense, the placeholder is the area that is called the contribution region. The placeholder is not an asset - it is just a marker on a page template or subtemplate that is used to show where the contribution region is relative to the placement of the other objects on the site template or subtemplate. The placeholder definition assigned to a placeholder defines if the contributor has access to edit data, and if the contributor can switch the content. The placeholder definition also defines which region definitions are available in the placeholder, and which region templates are available and which is the default for each region definition within the placeholder. Since a placeholder does not have to be accessible to contributors, and since a placeholder can contain a subtemplate that is then divided into other placeholders, its not always the case that a placeholder is strictly a contribution region. But in a general sense, when you conceive of a simple placeholder, it is the contribution region that the contributor works with.

8.4 Inserting Placeholders

Placeholders are used on page templates and subtemplates to mark an area to place the content. Placeholders are not assets; placeholder definitions are used to define how the placeholder is used on the page, and what content is placed on the page. To insert the placeholder, follow these steps: 1. Click in the template where you want to place the placeholder.

2. On the toolbar, click the Insert Placeholder button.

3. The Define Placeholder dialog see Define Placeholder Dialog on page A-106 appears. The dialog lists the placeholder names created in the Placeholder Definition Mappings dialog see Placeholder Definition Mappings Dialog on page A-104.

4. Select the placeholder name to associate with the placeholder and click OK.

8.5 Inserting Objects

Other site assets are easily added by placing the objects directly in the template. This can be done by selecting the icon from the toolbar, or by right-clicking on the template and adding the available site asset. Adding an object to a page template, subtemplate, or region template is very simple. To add an object, follow these steps: 1. Right-click in the template where you want to place the asset. 8-8 Oracle Fusion Middleware Users Guide for Site Studio Designer

2. A contextual menu appears. Select Insert Object.

3. A further contextual menu opens, and those site assets that are available to insert are displayed. For instance, you are not able to select an element unless you are in a region template. 4. After the site asset has been selected, it is added to the template. When you add an asset that has dynamic content such as a placeholder, then a marker appears in place of what content might be there. When you add an asset that has static content, such as an image, then the content appears. An asset can also be added directly in source view. On a region template, the region definition limits which elements are available to add.

8.6 Inserting Fragments

Fragments are simple to add to any template. To add a fragment to a template, you select the fragment from the fragment toolbox, and it is inserted at the selected location in the template. However, there is one important consideration to use with a fragment. A number of the fragments that are shipped with Site Studio Designer are composed of snippets that are used in the head and the body of the page template. Since subtemplates and region templates do not have a head, only a body, then the fragments do not work properly if inserted on these templates. For you to have fragments that work properly in a subtemplate or a region template, you should create your own fragments that have no head snippet, and one body snippet. Fragments that have a head snippet and body snippet will work in a page template, but will not work in other templates. This limits the reusability of the fragment. For more information, see Chapter 13, Working With Fragments.

8.7 Working With Text