# How Do I: Surface Dynamic Content in a Portlet?

WebLogic Portal allows you to designate targets inside portlets called Content Placeholders, and use configurable rules to select content at runtime. The process for surfacing dynamically generated content in a portlet is outlined this way:

- Load Content
- Define Content Placeholder
- Create Content Selector Rules
- Associate Content Placeholder to Portlet
- Use Content Preview Pane to Check Query

## Load Content

Use the Administration Portal to load content into the server. You can do this one of two ways:

- Add your own content from scratch. For more information, please refer to the WebLogic Portal Content Management Guide.
- Run the load_cm_data script to load sample content, as described in Step 4: Load Content of the portal tutorial, Showing Personalized Content in a Portlet.

## Define Content Placeholder

Use the Placeholder Designer to create a Placeholder for the content you dynamically select.

## Create Content Selector Rules

Use the Content Selector Designer to determine how the content will be queried.

## Associate Content Selector with Portlet

Drag the Placeholder or Content Selector JSP tag into a JSP, and use the Property Editor to select the Placeholder or Content Selector. Then drag the JSP onto a portal to invoke the Portlet Wizard, or drag the portlet onto a portal from the data palette.

## Use Content Preview Pane to Check Query

Select View --> Content Preview, and use the window that appears to view the results of the content selector.

Related Topics

Building Portlets