Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle Portal
11g Release 1 (11.1.1)

Part Number E10235-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

22.6 Assigning Parameter Values to Items Displayed on a Portal Template

When an item is assigned to a Portal Template, the item is always displayed within the context of that template. For more information, see Section 12.2.2, "Using Portal Templates with Items".

If the template contains one or more portlets, you can make the content of each portlet dependent on the item being displayed. You can configure items to pass parameter values to the template, and the surrounding portlets can decide whether or not to use the information to generate their content.

For example, consider the Portal Template for items illustrated in Figure 22-2. The center region contains the placeholder item type. The region on the left contains a navigation portlet that displays the navigation links relevant to the item being displayed on the template. On the right there are two portlets, one displaying Related Articles and the other Related Downloads. When an item is displayed with this template, it could pass parameters to the template. The parameters can pass values on to the portlets (Template properties: Parameter tab) such that all three portlets display content that is relevant to the item.

Figure 22-2 Portal Template for Items - Sample Layout

Sample Item Template
Description of "Figure 22-2 Portal Template for Items - Sample Layout"

For example, when the item About Oracle 10g.html is displayed on the template, it passes parameters to the other portlets on the page as shown in Figure 22-3. Notice how links in the navigation portlet, related articles, and related downloads are all associated with the item in the center, that is, Oracle Database 10g.

Figure 22-3 Portal Template for Items - Sample Item

Sample Item Template
Description of "Figure 22-3 Portal Template for Items - Sample Item"

If you want portlets, placed on Portal Template for Items, to display information relevant to the item currently being displayed with the template, here is an overview of the steps required:

  1. Design a suitable template for your items, see Section 12.2.2.1, "Creating Portal Templates for Items".

    Ensure that the template contains a placeholder item type and the portlets to which your items will pass parameter values.

  2. Add page parameters to the Portal Template and assign default parameter values to pass to portlets on the template, see Section 22.3, "Adding a Parameter to a Page or Portal Template".

  3. Define parameter values for items assigned to the Portal Template, see Section 22.6.1, "Defining Parameter Values for Items Displayed on a Portal Template".

22.6.1 Defining Parameter Values for Items Displayed on a Portal Template

If a Portal Template for items contains page parameters, you can specify parameter values for each item that is assigned to the Portal Template. When the item is displayed on its designated Portal Template, the parameter values are passed to the portlets on the template, controlling the portlet content that is displayed.

To define parameter values for items assigned to a Portal Template:

  1. Go to the page or template where you will add a parameter.

  2. Switch to Edit mode.

  3. Click the Page: Properties link in the toolbar at the top of the page.

  4. On the resulting page, click the Items tab to bring it forward.

  5. Select Use this portal template and then select the required Portal Template for the items on this page.

    Page parameters for the selected template are displayed beneath this radio button (under Template Input). If no parameters are defined, you cannot assign parameter values. See Section 22.3, "Adding a Parameter to a Page or Portal Template".

  6. From the drop-down list for the first parameter, choose:

    Null if you do not want items on this page to provide a value for this page parameter.

    Page to pass page details to the page parameter on the Portal Template.

    System Variable to pass the value of a system variable to the page parameter on the Portal Template; for example, USER_NAME.

    Constant to pass a specific value to the page parameter on the Portal Template.

  7. In the value field or list, choose the page or system variable whose value you want to pass to the page parameter, or enter a constant value.

  8. Define values for all remaining page parameters on the Portal Template.

  9. Click OK to return to the page.

If a user clicks an item link on this page, these values are passed to the corresponding page parameters on the designated Portal Template for items.

You can specify different parameter values for individual items on the page if required, see Section 22.6.1.1, "Overriding Parameter Values for an Item Displayed on a Portal Template".

22.6.1.1 Overriding Parameter Values for an Item Displayed on a Portal Template

If you enable the page option Allow items on this page to use a different Portal Template, values for Portal Template parameters can be defined for each item. This enables you to override a Portal Template parameter value for a particular item on a page, should a different value be required.

  1. Click the Page: Properties link in the toolbar at the top of the page.

  2. On the resulting page, click the Items tab to bring it forward.

  3. Select the Allow items on this page to use a different Portal Template check box.

    (Optional) Select Use this portal template and then choose a default template for the items on this page. You can also specify default values for page parameters on the designated template if you wish. The defaults are assigned to each item on this page, but you can override the defaults for individual items as described in the following steps.

  4. Click OK to return to the page.

  5. Click the Edit icon beside the item to which you will assign specific page parameter values.

  6. Select Use this portal template and then select the required Portal Template for items.

    Page parameters for the selected Portal Template are displayed beneath this radio button (under Template Input). If no parameters are defined you cannot assign parameter values. See Section 22.3, "Adding a Parameter to a Page or Portal Template".

  7. From the drop-down list for the first parameter, choose:

    Null if you do not want this item to provide a value for this page parameter.

    Page to pass page details to the page parameter on the Portal Template.

    System Variable to pass the value of a system variable to the page parameter on the Portal Template; for example, USER_NAME.

    Constant to pass a specific value to the page parameter on the Portal Template.

  8. In the value field or list, choose the page or system variable whose value you want to pass to the page parameter, or enter a constant value.

  9. Define values for all remaining page parameters on the Portal Template.

  10. Click OK to return to the page.

    If a user clicks the link for this item, these parameter values are passed to the designated Portal Template for items.