Working With Text Arranging Objects on the Template

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

Working with text in Design view is much like working with text in a word processing program with word-wrapping, line breaks, formatting options, and so on. To add text to a page template, simply click in the page template where you would like to add the text and start typing. Designer takes care of the necessary HTML code behind the scenes. After you add and edit your text, you can format it by changing the typeface and font size, indenting or centering the text, adding bulleted or numbered lists, and so on. Adding text directly to a template is discouraged. When the text is on the template, rather than the contributor data file, this makes localization more difficult.

8.8 Arranging Objects on the Template

How you arrange the information on your page, if you need a specific layout structure, can be done either with HTML tables or the use of CSS to place objects. For the most part, when you insert an asset on a page template, subtemplate, or region template, it is inserted where you place the cursor. However, this does not necessarily mean that the asset appears in the finished web page the same way it appears in Working With Templates 8-9 Designer. Variances such as the consumers browser choice, the browser window size, and what other objects a contributor has placed in the contributor data file can make the Web site appear to be organized differently. Using CSS is the more efficient method, because CSS files are a managed object and can allow for maximizing reusability. If you place a table in an asset, such as a subtemplate, then to use that same structure in other assets, you must re-create the table. If you do use tables in this way, then you must make the changes across multiple places when you want to make the changes. With CSS, you can identify the exact placement of each site asset, including elements, within the style sheet. Many prefer to use tables because they are easy to set up and create on the web page. A table offers a quick solution of structuring the relative placement. With a table, you can create a shape of cells that place data into relative placement to each other.

8.9 Applying CSS Classes