Skip Headers
Oracle® Universal Content Management
10g Release 4 (10.1.4)
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next

Adding, Editing, and Deleting Fragment Parameters

Parameters are a set of attributes that govern the appearance and behavior of a fragment when it is added to a template. When a fragment contains parameters, you are prompted to enter information in the Fragment Parameter Values dialog before adding the fragment to a template. Parameters can be used to add such things as text, color, size, or a query in the content server. And you can change the value of the parameters each time you add the fragment to a template.

While parameters are optional when building a fragment, they are very useful to make a fragment customizable and reusable. You can add most of a fragment's functionality to the source of the fragment, or you can add it as a parameter that can be changed when the fragment is actually used.

When parameters are used, you can have several renditions of the same fragment on the same template, where different parameters are used in each instance. Moreover, parameters can be useful for developers who have written code for the Web site and would like to hand off that code as a packaged feature (a customizable fragment) to a site designer. (This scenario assumes there are multiple users in Designer.)

Editing the Parameter in a Fragment

To edit the parameter in 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), select a parameter in the Name list.

    Parameter Selection in Fragment Parameters Dialog

    Parameter Selection in Fragment Parameters dialog box
  3. Make the appropriate changes to the Type, Description, Default Value, Query Text, and Option List (Query Text and Option List don't apply to all parameter types). See Properties for Fragment Dialog.

  4. Click the Parameter Up icon (Figure) or the Parameter Down icon (Figure) to move the parameter up or down in the list (this also affects its location in the Fragment Parameter Values dialog).

    Parameter Up icon

    Parameter Up

    Parameter Down icon

    Parameter Down
  5. Click OK to close the Fragment Parameters dialog.

To see a description of the parameters in the sample fragments, see Sample Fragments.

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), click the New Parameter icon (Figure) and type a name for the parameter in the text box provided.

    New Parameter Icon

    New Parameter Icon

    Parameter Name Entry in Fragment Parameters Dialog

    Parameter Name Entry in the Fragment Parameters dialog box
  3. Choose a type from the Type menu (for a description of each type, see Fragment Parameters Dialog).

  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) or the Parameter Down icon (Figure) to move the parameter up or down in the list (this also affects its location in the Fragment Parameter Values dialog).

    Parameter Up icon

    Parameter Up

    Parameter Down icon

    Parameter Down
  8. Click OK to close the Fragment Parameters dialog.

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).

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 in the code where you would like to add the parameter or parameter declaration, right-click, and then choose the appropriate action.

Menu for Inserting a Parameter Declaration

Inserting Parameter Declaration Menu

Menu for Inserting a Parameter

Inserting Parameter Menu

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 Sample Fragments.