Check the Make available for use in this page group check box if you want users

12-22 Oracle Fusion Middleware Users Guide for Oracle Portal page_pathitem_name?_template=page group nametemplate name A call to override the default Portal Template for items in a durable URL takes the following syntax: http:host:portportalpagedad[lang-language][ver-version] item_guid?_template=page group nametemplate name The template name to call is the Name specified when the template was created. This is in contrast to the template’s Display Name. You can create a Portal Template for items that includes a link to a printer-friendly version of the item using one of these URL formats in conjunction with two Item Placeholder items, each in its own region, two Portal Templates for items, and two HTML content layout templates. When you place two Item Placeholders on the same template, they render the same item. Armed with this knowledge, you can create a Portal Template for items that includes a link to a printer-friendly version of the item—one that gives more real estate to the article and eliminates unnecessary additional content. For example: ■ Create a Portal Template for items, named MainItem. ■ Create a second Portal Template for items, named PrinterFriendly. This is the template that will override the default item template currently selected in page or item properties. ■ On the MainItem template, create at least two regions: one for the display of item content, the other for the display of a link to the printer-friendly version of the item. Add an Item Placeholder to each region. ■ Create an HTML content layout template to render a link to the item using the item.url substitution tag and invoke the PrinterFriendly Portal Template for items using the URL syntax demonstrated at the beginning of this section. For example: a href=item.url?_template=mypgPrinterFriendly img src=imagesprinter.gif border=0 Printer Friendly a This code displays a printer icon with the label Printer Friendly Figure 12–7 . Figure 12–7 Printer Icon and Label The icon and text are enclosed in an HREF tag that references the displayed item’s URL item.url and the PrinterFriendly Portal Template for items ?_ template=mypgPrinterFriendly. This reference works for all items because the item.url substitution tag renders the URL of the current item, whatever that may be. Note: Before either call can work, the Printer Friendly template must already be created. Providing a Standard Look and Feel 12-23 ■ Apply the MainItem template to the page that contains the links to your articles. To apply the template, go to the Items tab of page properties. When users request an item, the item’s content is displayed within the context of the MainItem template. The MainItem template contains the Printer Friendly link to the requested item. When users click the Printer Friendly link, the same item is rendered, this time within the context of the PrinterFriendly template. In this example, the PrinterFriendly template is called at runtime. For additional information on the formation of URLs in Oracle Portal, see Appendix C, Formation of URLs in Oracle Portal . For additional information on substitution tags, see Appendix E, Substitution Tags for HTML and Unstructured UI Templates . For information on creating and applying HTML content layout templates, see Section 12.3.2, Using HTML to Define the Layout and Appearance of Region Content .

12.2.2.4 Editing Portal Templates for Items

To edit a Portal Template for items:

1. Log in to Oracle Portal.

2. Click the Build tab to bring it forward.

3. From the Page Groups portlet Work In drop-down list select the page group that

owns the Portal Template for items. By default, the Page Groups portlet is located on the Build tab of the Portal Builder page.

4. In the Layout Appearance section, under the Portal Templates heading, click

the link to the template to be edited. This opens the template in Edit mode.

5. Make your changes to the template. Once any cached versions of the template

expire, all items that use the template will display the edited version. You can accelerate this process by going to the page’s Access tab and clicking the Clear Cache link. For more information about templates and caching, see Chapter 21, Improving Page Performance .

6. To edit the properties of the template, click the Template: Properties link in the

toolbar at the top of the page. 7. Move from tab to tab, and edit properties as desired: ■ Main —Change the name or display name of the template; add a description; select page caching options; and specify the page assembly timeout. For information about the naming rules that apply to Portal Templates, see Appendix D, Object Naming Rules in Oracle Portal. For information on template caching options, see Chapter 21, Improving Page Performance . ■ Style —Select a style for the template. Styles specify a page’s colors and fonts. Click the Preview button and cycle through the Portlets, Items, Tabs, and Common radio buttons to preview the look and feel of a selected style. To learn more about styles, see Chapter 11, Working with Colors and Fonts .