close

Filter

loading table of contents...

Blueprint Developer Manual / Version 2207

Table Of Contents

5.4.16 Vanity URLs

Requirements

Editors should be able to define special URLs to special content objects which are easy to remember.

Solution

Vanity URLs are special human readable URLs which do not contain any technical identifiers like document IDs. CoreMedia Blueprint provides a means to assign vanity URLs to content objects.

Vanity URLs are configured in channel settings. Typically, there is one Vanity URL settings document for the root channel of a given site. This is the setup chosen for CoreMedia Blueprint demo content. To find the Vanity URL settings document, open the root channel of a site and switch to the Settings tab. You will find the Vanity URL settings document link inside the Linked Settings section.

Vanity URLs are defined as a relative URI path. The path might consist of several segments, but if you would like to keep your Vanity URLs simple, just use only one path segment. The URI path is then prepended with a path segment consisting of the site name. For example, for the site corporate, a URI path of my/special/article would yield the Vanity URL /corporate/my/special/article.

To add a Vanity URL for a document, follow these steps:

  1. Select the StructListProperty vanityUrlDefinition and create a new child Element Struct by clicking the [Add item to List Property] symbol in the toolbar.

  2. Create a new LinkProperty and name it "target".

  3. Set the content type field to the type of your target document.

  4. Click on the value field, this will open the library window. Drag your target document from the library window into the value field.

  5. Create a StringProperty, name it "id" and type your vanity URI path inside the value field.

Once the settings document is published, the new Vanity URL is reachable on the live site, and it is used for all generated links referring to the target document.

Note

Note

While it is possible to define multiple Vanity URLs for a single target document it might cause confusion when looking on the links of the website. By default, the first "id" in the settings document that refers to the target document will be used for link creation.

Note

Note

Defining multiple target documents for a single Vanity URL is not prevented by the Studio but it is usually not desired. A link will be generated for every target but the resulting URL will only point to the document referenced by the first occurrence of the "id" in the settings.

Caution

Caution

A Vanity URL can overlap with other dynamic URLs on your website. A Vanity URL will always take precedence. Consequently, the document behind the other dynamic URL will not be reachable on the website anymore.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.