+

Search Tips   |   Advanced Search

Example 2: Generate a friendly URL for web content
Create a content URL generation filter class

This example demonstrates a content URL generation filter that generates a friendly URL for web content.

The filter determines the target portal page used to render the web content. If there is a web content page that has a content association that references a parent site area of the content, the filter writes out a friendly URL to the content.
Friendly URLs for web content are constructed according to a several factors. For example, the friendly URL /wps/myportal/home/news/news+1 is determined by the following details:

  • Content path: /Library1/News/News 1

  • Content association on the web content page where the content is rendered: /Library1/News site area

  • Friendly URL of this page: /home/news

To use the sample filter described here, each page for which a content URL is generated must have these characteristics:

  • The page must be a web content page with a friendly name.

  • The page must have a default content association that references the parent site area of the content item.

The friendly URLs generated by this sample filter do not contain any portlet state information. When a user clicks one of these friendly URLs from within a web content viewer that does maintain state information, the state information in the viewer is cleared.

These sample filter classes are not provided by default with IBM Web Content Manager. Example code is provided here we can take and use to implement the classes yourself.


Parent Create a content URL generation filter class

Related concepts:

Friendly URLs and Web Content Viewers