Establishing Consistent Presentation Using Item Placeholders

Purpose

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.

Time to Complete

Approximately 30 minutes

Topics

This tutorial covers the following topics:

 Overview
 Prerequisites
 Getting Started
 Adding Content

Creating a Portal Template with an Item Placeholder

 Apply the Portal Template for Items
 Apply a Page Skin to Your Root Page
 Summary
 Related Information

Viewing Screenshots

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

Overview

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.


Back to Topic List

Prerequisites

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.

Back to Topic List

Getting Started

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

Log In

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.

 

Back to Topic

Define a Page Group

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  (Delete Region) to delete the region containing your default navigation banner.

 

5.

When prompted, click Delete Content.

Your root page is redisplayed without the navigation banner.

 


 

Back to Topic

Back to Topic List

Adding Content

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  (Add Item) in the top region.

 

2.

Select Text from the Content Item Type list. Then click Next.

 

3 .

Enter the Text item's attributes:

Text:

ThinkQuest International 2006 Challenges Students To Build The Best Educational Web Site

New Competition Now Open to Students and Teachers Worldwide

REDWOOD SHORES, Calif., 15-AUG-2005 The Oracle Education Foundation today announced the opening of a new ThinkQuest competition. ThinkQuest International 2006, inviting students and teachers from around the world to take part in this unique collaborative learning experience. this educational contest is open to students between the ages of 9 and 19 and their teacher-coaches from anywhere in the world. The program promotes collaboration and cross-cultural learning by encouraging students to team with peers in other regions to develop Web sites on educational topics. In the process of creating their site, students learn and practice their skills in research, writing, organizing content, and teamwork.

 

Display Name:

New ThinkQuest Competition

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.

 

Creating a Portal Template with an Item Placeholder

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

Back to Topic List

 

Define an HTML Page Skin

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

Copy the HTML code below and and paste it in the Template Definition field.

Tip: You can use [Ctrl] + [A] to select the code, [Ctrl] + [C] to copy it, and [Ctrl] + [V] to paste it.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>#title#</title>
<style type="text/css">
<!--
.body2 {
background-color: #b8c0d3;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: large;
}
.style2 {
color: #FFFFFF;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt;
}
-->
</style>
</head>
<body class="body2">
#page.style#
#page.base#
<table align="center" bgcolor="#ffffff" border="0"
cellpadding="0" cellspacing="0" height="100%"
width="80%">
<tbody>
<tr>
<td class="style1" bgcolor="#000059">Welcome
to Oracle Portal</td>
</tr>
<tr>
<td align="right" height="28" nowrap="nowrap"><img
style="width: 100%; height: 28px;" alt=""
src="<portal_unzip>/stretchbar.jpg"></td>
</tr>
<tr>
<td height="80"><img
style="width: 100%; height: 80px;" alt=""
src="<portal_unzip>/main.jpg"></td>
</tr>
<tr>
<td align="right" background="<portal_unzip>/bluebar.gif"
height="25"><a class="style2"
href="#PAGE.EDITPAGE.URL#">Edit</a></td>
</tr>
<tr>
<td align="center" height="100%" valign="top">&nbsp;#BODY#&nbsp;</td>
</tr>
<tr>
<td background="<portal_unzip>/bottom-shade.gif"
height="25">&nbsp;</td>
</tr>
</tbody>
</table>
</body>
</html>

 

b.

Replace all occurrences of <portal_unzip> with the location of your portal_unzip directory, for example, C:\working\obe_images.

 

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.

Back to Topic

Define a Portal Template

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.

Display Name: Cloudy Placeholder
Navigation Page for Banner: <None>
(selected) Make available for use by this page group

 

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:

a.

Click Template Properties.


b.

Click the Optional tab.

 

c.

Click Use HTML Page Skin and select CLOUDY from the list.

 

d.

Click OK to resume editing the template. You can see the impact of the page skin.

 

 

Back to Topic

 

 

Add an Item Placeholder

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  (Add Item) in the bottom region.

 

2.

Perform the following steps to add Item Placeholder to the list of item types:

a.

Click configure the list of available item types.

 

b.

Select Item Placeholder and click  (Move Right) to add the item type to the Visible Item Types list.

 

c. Click OK.

 

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.

 

 

Back to Topic

Back to Topic List

 

Apply the Portal Template for Items

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  (Edit Defaults) for the item. In this tutorial, however, you are applying the Portal Template for items to the page so that it controls the display of all URL-accessible items on the page.

 

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.

 

 

 

Summary

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.

Back to Topic List

Related Information

 

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.

 

Back to Topic List

 Place the cursor over this icon to hide all screenshots.


Trademarks

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

 

Left Curve
Popular Downloads
Right Curve
Untitled Document