Inserting Parameters and Parameter Declarations in a Snippet

Working With Fragments 13-19

13.12.6.2 Adding a New Parameter to a Fragment

To add a parameter to a fragment, perform these tasks:

1. With the fragment open in the Fragment Editor, click Parameters.

2. In the Fragment Parameters dialog see

Properties for Fragment Dialog on page A-89, click the New Parameter icon Figure 13–18 and type a name for the parameter in the text box provided. Figure 13–18 New Parameter Icon Figure 13–19 Parameter Name Entry in Fragment Parameters Dialog

3. Choose a type from the Type menu for a description of each type, see

Fragment Parameters Dialog on page A-91.

4. Enter a description in the Description field.

The description displays at the bottom of the Fragment Parameter Values dialog when you use the fragment.

5. Enter a value for the Default Value.

This value is used if you do not choose a parameter value in the Fragment Parameter Values dialog when adding the fragment to a template.

6. Enter a value for Query Text and Option List this applies only to parameters of

type text, manageddoc, and managedurl.

7. Click the Parameter Up icon

Figure 13–20 or the Parameter Down icon Figure 13–21 to move the parameter up or down in the list this also affects its location in the Fragment Parameter Values dialog. Figure 13–20 Parameter Up icon Figure 13–21 Parameter Down icon

8. Click OK to close the Fragment Parameters dialog.

13.12.6.3 Inserting Parameters and Parameter Declarations in a Snippet

After you create one or more parameters in the Fragment Parameters dialog, you can insert those parameters into the individual snippets in the fragment for more in snippets, see Adding, Editing, and Deleting Fragment Snippets on page 13-14. The Fragment Editor includes a convenient option to insert parameters and parameter declarations directly into your snippet code. To insert them, simply place your cursor 13-20 Oracle Fusion Middleware Users Guide for Site Studio Designer in the code where you would like to add the parameter or parameter declaration, right-click, and then choose the appropriate action. Figure 13–22 Menu for Inserting a Parameter Declaration Figure 13–23 Menu for Inserting a Parameter A good way to learn how to create and use parameters is to open a sample fragment from the Toolbox and see how its parameters are used. For a description of these fragments and their parameters, see Appendix C, Sample Fragments.

13.12.7 Adding, Editing, and Deleting Fragment Elements

Elements are areas in a contribution region that can be edited using the Contributor application. These elements appear as fields in Contributor, where users contributors can edit text, graphics, and other content. The most common use of an element is to first create a contribution region on a page template, and then add one or more elements WYSIWYG, plain text, image, or custom to that region. Contributors can then open the web page containing the region and add and edit the text or graphics in each field. A more advanced use of an element is to include it in a fragment to create a static list. A static list bundles multiple elements in a table-like layout that allows contributors to add, edit, delete, and even rearrange rows and columns of elements see Static List Fragments on page C-23.

13.12.7.1 Adding an Element to a Fragment

To add an element to a fragment, perform these tasks:

1. With the fragment open in the Fragment Editor, click Elements.

This opens the Fragments Elements dialog see Fragment Elements Dialog on page A-91.