In this tutorial, you define a Portal Template with an item placeholder to control how the content of items that are accessed by URLs will be displayed.
Approximately 30 minutes
This tutorial covers the following topics:
| Overview | |
| Prerequisites | |
| Getting Started | |
| Adding Content | |
| Apply the Portal Template for Items | |
| Apply a Page Skin to Your Root Page | |
| Summary | |
| Related Information |
Place the cursor over this icon to load and view all the screenshots for this
tutorial. (Caution: Because this action loads all screenshots simultaneously,
response time may be slow depending on your Internet connection.)
An item placeholder controls the way the content of an item is rendered when the user accesses the item by means of a URL. Item placeholders work with the following URL-accessible item types: PL/SQL, Text, URL, HTML File, and Text File. The easiest way to access these items is to show the item as a link on a page, which is what you will do in this tutorial.
By default, the content of a URL-accessible item is displayed in a basic browser window:

By applying a Portal Template containing an item placeholder (known as a Portal Template for items) to your page, you can control how the content of URL-accessible items contained on the page will be displayed. In this way, you can create a uniformity between your portal page and the display of individual item content. The screenshot below shows the item content from the previous screenshot displayed using an item placeholder:

In this tutorial, you create a Portal Template with an item placeholder, which you apply to a portal page. The result is that all URL-accessible items on the page will use the template when you directly access the item.
Note: Item Placeholder is a new item type. A template that contains an item placeholder is called a Portal Template for items.
Before starting this tutorial, you should:
| |
Have access to or have installed Oracle Portal 10.1.4.
|
| |
Have an Oracle Portal user name and password with appropriate access to manage templates and to create pages and items.
|
| |
Have access to an Internet browser such as Mozilla Firefox or Microsoft Internet Explorer (IE).
|
| |
Have downloaded portalOBE.zip and unzipped it into your working directory (referred to as <portal_unzip> in this tutorial). Note: If you have completed the Achieving Pixel-Perfect Page Design with HTML Templates OBE tutorial, you will already have met this prerequisite. Tip: For information on uploading images to the middle tier of your application server, refer to the prerequisites for the Achieving Pixel-Perfect Page Design with HTML Templates OBE tutorial. |
In this section, you log in and create a new page group, which you use to build your portal.
| Log In | |
| Define a Page Group |
To log in, perform the following steps:
| 1. | Open a browser window and enter the appropriate URL for accessing Portal Builder; for example, for a default installation, the URL is: http://<hostname>:7778/pls/portal.
|
| 2. |
Click Login.
|
| 3. | Enter your user name and password and click Login.
|
| 4. | From the Oracle Portal home page, click the Build tab.
|
A page group is the structure that Oracle Portal uses to group related portal objects such as pages, page templates, styles, navigation pages, categories, perspectives, and more. The page group typically contains a collection of pages for organizing content.
To create the page group that you will use to build the your portal, perform the following steps:
| 1. | Click the Create Page Group link.
|
| 2. |
In the Display Name field, enter <Your Name>Item Placeholder, where <Your Name> is your name.
|
| 3. |
Click Create.
When you create a page group, a page is automatically created as a member of the page group. This root page uses the same name as the page group. After you create the page group, your root page automatically displays in Edit mode.
|
| 4. | Click
|
| 5. |
When prompted, click Delete Content.
Your root page is redisplayed without the navigation banner.
|
In this section, you add a Text item to your portal.
To add a text item to your new portal, perform the following steps:
| 1. | Click
|
||||
| 2. |
Select Text from the Content Item Type list. Then click Next.
|
||||
| 3. |
Enter the Text item's attributes:
Tip: You can copy the text above and paste it in the appropriate fields. Note: Feel free to modify the fonts and make any other formatting changes, as we have in the example.
|
||||
| 4. | Scroll down to the Display Options. Select Link That Displays Item In Full Browser Window.
Note: You can use a Portal Template for items only when you select one of the Link display options for the item. By selecting this option, you are ensuring that the Text item will be displayed as a link on the page and is easily accessible by means of a URL. If, however, you select Item Displayed Directly In Page Area, the Portal Template for items you have associated with the item is ignored.
|
||||
| 5. | Click Finish. The link to the Text item is displayed in your portal.
|
||||
| 6. | Click the item link (New ThinkQuest Competition).
|
||||
| 7. | Notice that the item text appears in a basic browser window.
In the next section, you create a Portal Template with an item placeholder to provide a more professional appearance for the displayed item.
|
||||
| 8. | Click the browser's Back button to return to your portal.
|
An item placeholder is a special item type that is available exclusively in Portal Templates. An item placeholder has no content of its own, but at runtime it dynamically displays the content of the item being requested. When the user clicks the item, the item content displaces the item placeholder on the template. Item placeholders work with the following URL-accessible item types: PL/SQL, Text, URL, HTML File, and Text File.
When you build your template, you will add an item placeholder for the items that will be viewed inside the template at run time.
| Define an HTML Page Skin | |
| Define a Portal Template | |
| Add an Item Placeholder |
An HTML Page Skin is a template that defines the appearance of the area surrounding your page content. In this section, you define a page skin to add a professional appearance to the Portal Template that you create in the next section.
Note: You can apply a page skin directly to a portal page. In this tutorial, however, you apply the page skin to a Portal Template because an item placeholder requires a Portal Template.
To create an HTML Page Skin, perform the following steps:
| 1. | Click the Builder link.
|
|||||
| 2. |
Select your page group ( <Your Name> Item Placeholder ) from the Work In list of values.
|
|||||
| 3. |
Find HTML Templates and click the Create link.
|
|||||
| 4. | With HTML Page Skin selected as the Template Type, enter cloudy in the Template Name field.
|
|||||
| 5. | Delete the contents of the Template Definition field.
Tip: You can use [Ctrl] + [A] to select the code and [Ctrl] + [X] to delete it.
|
|||||
| 6. |
|
|||||
| 7. | Click Preview and compare the results with the screenshot below:
|
|||||
| 8. | Click Create.
|
|||||
| 9. |
When the message "Click CLOUDY to edit the template" is displayed, click Close.
|
To create a Portal Template, perform the following steps:
| 1. |
In Portal Builder, find Portal Templates and click the Create link.
|
||||||||
| 2. | Enter the following information for the Portal Display Properties.
|
||||||||
| 3. | Click Finish. The template opens in edit mode.
|
||||||||
| 4. |
To add a professional appearance to the Portal Template, you will apply the CLOUDY HTML page skin. Perform the following steps:
|
Portal Templates for items are assembled dynamically when an item is rendered via a URL. The item placeholder reserves a position within the template layout. As an item is rendered, that position is filled with the item's content.
Note: You can add an item placeholder only to a Portal Template and only to one that is not currently applied to any pages in the page group. The Item Placeholder item type is not available for selection on any other type of page.
To add an item placeholder to your Portal Template, perform the following steps:
| 1. |
Click
|
||||||
| 2. |
Perform the following steps to add Item Placeholder to the list of item types:
|
||||||
| 3. |
Select Item Placeholder from the Content Item Types list and click Next.
|
||||||
| 4. |
Click Finish without defining a default value for the item.
Note: If specified, the default is used when a user calls the URL to the Cloudy Placeholder template directly.
|
||||||
| 5. | Once an item placeholder is added to a Portal Template, the Portal Template becomes a Portal Template for items and is available for use with items only. Notice the text that specifies "This is an item placeholder." Click Click to preview how content will be rendered.
The preview shows how the item attributes will appear when an item is called by its URL.
Tip: You can change how the item content will be rendered: Edit the properties of the containing region and click the Attribute tab.
|
Use Portal Templates for items to control how items display when they are rendered via a URL, rather than when they are rendered in place on a page. For example, imagine an item link on a page. You click the link, and the item content displays within the context of its associated Portal Template. The item’s content and its associated template are assembled dynamically as a result of rendering the item link’s URL. A Portal Template for items is invoked only when the item has been rendered from a URL and it cannot be applied to pages.
To apply the Portal Template to the root page of your portal, perform the following steps:
| 1. |
Click the Builder link.
|
| 2. | In the Layout and Appearance section of the Page Groups portlet, click the <Your Name> Item Placeholders root page link.
|
| 3. |
Click Page Properties.
|
| 4. | Click the Items tab.
|
| 5. | In the Portal Template Assignment section, select Use this portal template. The Cloudy Placeholder template is already selected.
Note: When the Allow items on this page to use a different Portal Template check box is selected, you can select a different Portal Template for items when you edit a specific item. You can apply a Portal Template for items to an individual item by clicking
|
| 6. | Click OK.
|
| 7. | Click View Page.
|
| 8. |
Click New ThinkQuest Competition.
|
| 9. |
Compare your item content display with the screenshot below:
|
| 10. |
When you are finished, click the browser's Back button twice to return to Edit mode.
|
Now that your URL-accessible items are displayed using a professional-looking template, you probably want the root page of your portal to have a similar look.
To apply an HTML page skin to the root page of your portal, perform the following steps:
| 1. |
Click Page: Properties.
|
| 2. | Click the Template tab.
|
| 3. | Select Use HTML Page Skin. The CLOUDY page skin is already selected.
|
| 4. | Click OK. The CLOUDY page skin surrounds the portal page.
|
| 5. | Click View Page.
|
| 6. | Click New ThinkQuest Competition. .
Notice that the ThinkQuest item appears to be displayed in place on the same page.
|
An item placeholder controls the way the content of an item is rendered when you access the item by means of a URL. In this tutorial, you defined a text item that is URL-accessible. You then created a Portal Template and added an item placeholder to it. You applied the Portal Template for items to your portal page and verified that the item placeholder controls the display of item content for the URL-accessible items on the page.
To learn more about HTML Page Skins and HTML Content Layouts, see the Achieving Pixel-Perfect Page Design with HTML Templates OBE tutorial. |
|
| To learn more about Oracle Portal 10.1.4, read the OracleAS Portal 10.1.4 New Features white paper. | |
| To learn more about Oracle Portal, visit the Oracle Portal Center. |
Place the cursor over this icon to hide all screenshots.
Oracle and the Oracle logo are trademarks or registered trademarks of Oracle Corporation in the United States and other countries. All other names are trademarks and/or registered trademarks of their respective owners.
| Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065, USA http://www.oracle.com/ |
Worldwide Inquiries: 1-800-ORACLE1 Fax 650.506.7200 |
Copyright and Corporate Info |