Configure Automatic Pretty URL Generation - Fluid Topics - 3.9

Fluid Topics Configuration and Administration Guide

Category
Reference Guides
Audience
public
Version
3.9

Selecting the Pretty URL tab in the Knowledge Hub section of the Administration menu displays the Pretty URL administration interface, where users with either the ADMIN or KHUB_ADMIN role can configure a rule engine that automatically generates pretty URLs for structured documents, unstructured documents, and topics.

Fluid Topics displays pretty URLs in the following locations:

  • In the browser's address bar when users view content in the Reader page or the Viewer page.
  • Whenever a user shares a document's or topic's link, in order to provide an at-a-glance preview of what the content is about.

The Pretty URL administration interface is composed of two sections as follows:

  • A section to define pretty URL templates for documents.
  • A section to define pretty URL templates for topics.

Configuration involves entering metadata and, if desired, adding static text or metadata requirements. There are no restrictions as to which metadata administrators can include in a pretty URL.

For topic templates, it is possible to reference the document's metadata with the document. prefix. For example, it is possible to integrate the document's pretty URL (if one exists) at the beginning of the topic's pretty URL by starting the topic template with {document.ft:prettyUrl}/.

It is also possible to concatenate the metadata of all parent topics and the current topic by using {parents-and-self.metadata}. As a result, the pretty URL will contain a breadcrumb with all levels of a document's hierarchy. This is useful if two or more topics within the same book share the same pretty URL, in which case Fluid Topics adds a tocId to the Pretty URLs of these topics as in the following example:

https://doc.antidot.net/r/3.9/Use-Fluid-Topics-Web-APIs/Knowledge-Hub?tocId=F7CSvONYRQv6tlDCyPbugA

By configuring the Pretty URLs to use {parents-and-self.metadata} for topics on doc.antidot.net, the new pretty URL contains the topic's breadcrumb instead of a tocId as follows:

https://doc.antidot.net/r/Use-Fluid-Topics-Web-APIs/Analytics/Knowledge-Hub



- It is necessary to place metadata inside brackets.

- Only content with all of the metadata defined in one of the templates will have a pretty URL.

- If an administrator defines a template in the Pretty URL administration interface and then modifies this template at a later date, this is likely to break pretty URLs which were automatically generated prior to the modification.

- Defining rules to automatically generate pretty URLs does not override any existing pretty URLs that were previously defined by means of a control file, a source document, or a web service.

Selecting the Save button in the Pretty URL administration interface displays a dialog asking for permission to trigger a reprocess job in order to apply the pretty URL templates.

Reprocessing can take a considerable amount of time if a lot of content has been published to the portal. Any content a user uploads while a reprocess job is underway is queued and processed after the reprocess job is complete.

Rendering for spaces and special characters

For generated pretty URLs configured in the UI (as opposed to those defined manually in a control file or a source document), spaces and special characters are allowed when adding static text and metadata values. However, with the exception of underscores, periods, tildes and forward slashes, all special characters (including spaces) are transformed into hyphens in the rendered pretty URL. Additionally, any characters with accents entered as static text or in a metadata value are transformed into characters without accents in the rendered pretty URL.

To separate sections, valid characters include a dash (-), an underscore (_) or a slash (/).

Metadata hierarchy

The Fluid Topics pretty URL generator takes into account the first metadata value indicated for each metadata key. For hierarchical metadata, the generator takes into account the last value of the first branch of the hierarchy. It is currently not possible to enter multiple values for the same metadata.

Template hierarchy

The Fluid Topics pretty URL generator tries to apply templates in the order in which they are listed in the Pretty URL administration interface. For this reason, it is recommended to place more specific templates (e.g., a template with metadata restrictions) at the top of the list and less specific ones (e.g., a "catch all" template) at the bottom.