Skip navigation.

Interaction Management Guide

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Placeholders

Placeholders display a single content item on a JSP—a content item dynamically retrieved from BEA's Virtual Content Repository. A placeholder retrieves content using predefined queries that are put in the placeholder.

Think of a placeholder as a bucket that holds queries, runs one query at a time, and displays one of the content items retrieved by the query. A placeholder is made up of two parts: a placeholder file you create in WebLogic Workshop and a companion JSP tag that performs the processing.

In Figure 4-1, the placeholder file is called "foo", and the JSP tag references the placeholder file.

Figure 4-1 The two parts of a placeholder: a placeholder file and a JSP tag

The two parts of a placeholder: a placeholder file and a JSP tag


 

This chapter describes how queries are put in placeholders and how the placeholder decides which query to run and which content item to display.

This chapter includes the following sections:

 


Queries that Placeholders Run

Placeholders can run two types of queries: default queries and campaign queries. Both types of queries have the exact same structure but come from different places.

Figure 4-2 shows the location on a page where the placeholder will display an image, either from a default query or a campaign query. The image is retrieved from BEA's Virtual Content Repository through a query. A placeholder uses different factors to determine, first, which of its queries to run, and then which of the retrieved content items to display.

Figure 4-2 Placeholders can display default content and campaign content

Placeholders can display default content and campaign content


 

 


Types of Content Placeholders Can Display

Placeholders use a document's MIME-type attribute to generate the appropriate HTML tags that the browser requires. By default, placeholders generate the appropriate HTML tags only for the following MIME types:

If you want to use additional MIME types in placeholders, see "Supporting Additional MIME Types" in the WebLogic Workshop help system at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/portal/buildportals/mimetypes.html.

Setting up Content for Use in Placeholders

There are specific properties you can add to content items to better support the use of content in placeholders. See Setting up Content in this guide.

 


Creating Placeholders

Creating a placeholder involves creating a placeholder file in WebLogic Workshop and using companion <ph:placeholder> JSP tags in any relevant JSPs. Each <ph:placeholder> JSP tag must use its "name" attribute to reference a placeholder you have created in WebLogic Workshop.

For steps on creating placeholders, see the following topics in the WebLogic Workshop Help system:

Building Content Queries

WebLogic Portal provides advanced content query features for building powerful content queries. For more information, see "Building Content Queries with Expressions" in the WebLogic Workshop help system at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/portal/buildportals/contentExpression.html.

Adding Placeholders to JSPs

After you create a placeholder file in WebLogic Workshop, you can add the placeholder to a JSP in a number of ways in WebLogic Workshop:

 


How Placeholders Choose Which Query and Which Content

Placeholders go through a two-step process in choosing which content to display. This section describes:

  1. How a placeholder chooses which query to run.
  2. Once a query has run, how a placeholder chooses which content item to display from the query.

1. How a Placeholder Chooses a Query

When you add a default query to a placeholder or create a campaign query in WebLogic Workshop, you can assign each query a "priority": highest, high, normal, low, or lowest. The higher the priority, the higher the likelihood that the query will be run instead of other queries.

If a query does not find any documents, the placeholder chooses another query and runs it.

You can also define default queries so that they do not run when campaign queries are present. For more information, see Combining Default Queries and Campaign Queries in Placeholders.

2. How a Placeholder Chooses Which Content Item to Display

Depending on how broadly you define a query and on the number of documents in your content management system, a query could return multiple content items. By default, a placeholder randomly selects a content item to display. To make this selection less of a random choice, you can add a property called adWeight to your content items, as described in Setting up Content in this guide.

The higher the adWeight number you assign to a content item, the higher the likelihood that the content item will be displayed in a placeholder when the content item is retrieved by a query.

 


Combining Default Queries and Campaign Queries in Placeholders

Placeholders can often become crowded with many queries, especially if more than one campaign uses a placeholder to display content. Campaign queries can remain in placeholders indefinitely unless something specific occurs to remove them. This section describes techniques you can use to clear out unwanted queries and better control the content that is displayed in a placeholder.

 


Using <ad:adTarget> Instead of a Placeholder

You can also use the <ad:adTarget> JSP tag to display a content item on a JSP. This tag does not rely on a definition file like a placeholder does. You simply add a query using the tag's "query" attribute. The query retrieves one or more content items (the same types of content items that placeholders can display), and the tag chooses which content item to display in the same manner as the <ph:placeholder> tag. Campaigns do not put queries into an <ad:adTarget> tag, so the tag cannot display personalized content.

For information on building queries, see "Building Content Queries with Expressions" in the WebLogic Workshop help system at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/portal/buildportals/contentExpression.html.

See "<ad:adTarget> Tag" in the WebLogic Workshop help system at http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/portal/taglib/www.bea.com/servers/portal/tags/ad/adTarget.html.

 

Skip navigation bar  Back to Top Previous Next