+

Search Tips   |   Advanced Search

Example 2: Generate a friendly URL for web content

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:

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

The friendly URLs that are 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.

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


Parent: Create a content URL generation filter class

Related:

Friendly URLs and web content viewers