Fragment Handling in Templates Fragments in the Toolbox

13-2 Oracle Fusion Middleware Users Guide for Site Studio Designer your own see Fragments in the Toolbox on page 13-2. To use a fragment, simply place your cursor on the template where you would like the fragment to appear and then click the desired fragment in the Toolbox. You can customize the way a fragment appears on a template by changing its parameters in the Fragment Parameter Values dialog, which you see when you add the fragment to a template. The fragments contain parameters so that you can customize the fragment each time you use it on a template. If theres a setting that youre unable to change in a parameter, you can always open the fragment in the Fragment Editor and customize it there; even add your own custom parameter if you like.

13.3 Fragment Handling in Templates

Page templates, being complete HTML documents, have a HEAD and BODY in their code. Subtemplates and region templates, however, do not have a HEAD section. You must be aware of this distinction when placing a fragment, and also when creating and editing fragments. The snippets inside of a fragment have a designated location of head, drop-point, top-of-body, or bottom-of-body. These designations are made when creating or editing fragments in the Fragment Editor dialog see Fragment Editor Dialog on page A-87. Those snippets designated with a head location must be placed on a template with a HEAD; that is, they must be placed on a page template because they require the header to work. If you place a fragment that has a snippet with a head location on a region template or a subtemplate, then the fragment cannot work. When you put a fragment on a page template, this includes information in the XML data island, specifically in the SSINFO tag. When you put a fragment on a subtemplate or a region template, then a wcmFragment tag is placed in the HTML. In both cases this can be seen in source view. It is recommended that, whenever possible, you create fragments with a single body snippet. The fragment can then be used in any situation, whether it is on a page template, a subtemplate, or a region template.

13.4 Fragments in the Toolbox

Site Studio includes numerous out-of-the-box fragments that you can begin using right away without knowing how to create or edit a fragment. Using the sample fragments is a great way to add instant functionality to your Web site while learning about the practical use and potential of a fragment. Working With Fragments 13-3 Figure 13–1 Sample Fragments in the Toolbox The sample fragments are available in the Toolbox and are divided into four categories: ■ Navigation Fragments : This category contains fragments that provide site navigation for your Web site navigation bar, breadcrumbs, search box, and so on. The beauty of a navigation fragment is that it automatically reads your existing site hierarchy and converts the sections into hyperlinks that display in a navigation menu. Consequently, you can update and change your site hierarchy, and those changes are seen immediately on your Web site. For a description of these fragments, see Navigation Fragments on page C-1. ■ Dynamic List Fragments : This category contains fragments that provide advanced contribution features for your Web site, specifically the ability to query for contributor data files and native documents in the content server. Contributors can then use the Contributor application to add, remove, and edit the files in the list see Dynamic List Fragments on page C-20. 13-4 Oracle Fusion Middleware Users Guide for Site Studio Designer ■ Static List Fragments : This category contains fragments that provide advanced contribution features for your Web site, specifically the ability to create a structured layout of elements WYISIWYG, plain text, image, and custom. Contributors can then use the Contributor application to add, remove, and edit rows and columns of information in the list see Static List Fragments on page C-23. ■ Other Fragments : This category contains miscellaneous fragments that you may find useful for your site a copyright line, an embedded Flash presentation, a dynamically converted native document, Manager, and so on. For a description of these fragments, see Other Fragments on page C-24.

13.5 Filtering Fragments in the Toolbox