Configure Tag Page URLs

Tag pages are automatically generated pages created from tagged content items. When a user clicks on a tag keyword link, the corresponding tag page is displayed. The tag page usually contains a brief article about or definition of the subject of the tag, followed by teasers and links leading to tagged content items.

Tag page URLs have the following structure by default:

publication-url/tags/tag-structure-name/tag-term

The URL of the tag page for the term bangladesh in the places tag structure, for example, would be:

www.example.com/tags/places/bangladesh

The tag page URLs are generated by a component called TagURLHelper. You can configure this component to generate different tag page URLs by adding a TagURLHelper.properties file to your common configuration layer (/etc/escenic/engine/common/com/escenic/framework/tag/TagURLHelper.properties) and setting the following properties:

path-prefix

This property determines the prefix placed after the publication URL and before the tag structure name. If, for example, you specified path-prefix=tagged-as then the example URL shown above would change to:

www.example.com/tagged-as/places/bangladesh
tagStructurePathPrefix.tag-structure-name

These properties can be used to change the URL string used for specific tag structures. If, for example, you specified tagStructurePathPrefix.places=geographical, then the example URL shown above would change to:

www.example.com/geographical/bangladesh

You can enter several such properties in order to redefine the URL strings for multiple tag structures.

A sample TagURLHelper.properties is included in the Widget Framework distribution (/misc/siteconfig/com/escenic/framework/tag/TagURLHelper.properties).

Including sections in tag page URLs

Prior to version 3, the tag pages generated by the Widget Framework (which were called topic pages) had URLs that included section components (www.example.com/sport/topic/bangladesh, for example). You can force the Widget Framework to continue generating these kinds of URLs by adding a TopicProcessor.properties file in publication's WEB-INF/classes/com/escenic/servlet/plugin-config/com/escenic/framework/topic/TopicProcessor.properties and setting the following property:

sectionSpecificTopicURIEnabled=true

A tag page for bangladesh in the places tag structure will then have a URL something like this:

www.example.com/sport/tags/places/bangladesh