Nice URLs

When the feature is activated, editors can specify Nice URLs for individual pages. The nice URL is an alternative URL for a specific page besides the default URL, which is constructed by concatenating the folder’s publish directory and the page’s filename. It can for example be used as easy to remember short-cut to specially featured pages.

1 Configuration

The feature must be activated

/Node/etc/conf.d/*.conf

	$FEATURE["nice_urls"] = true;

2 Editing

When the feature is activated, an additional field Nice URL will be included in the page properties dialog. The field may be left empty for pages without nice URL. If a nice URL is set, it must begin with a “/” and must not end with a “/”. Input that does not comply with these constraints will be corrected automatically.

2.1 Validation

Any input will be sanitized according to the rules for folder paths and will then be made unique (against other nice URLs or combinations of folder.pub_dir + filename), so that no two objects would be addressed by the same URL.

3 Publishing

To publish a page’s nice URL into the Content Repository, the meta attribute page.nice_url must be mapped to an attribute (e.g. nice_url).

4 Frontend Implementation

The frontend implementation must be able to resolve the nice URL to the page. Please consult the guides for Gentics Portal.Node PHP or Gentics Portal.Node Java for details.