aceUISlugEditor
A slug editor widget that can automatically generate web-safe slug names based on string values anywhere in content data.

The primary use case of the aceUISlugEditor widget is to automatically generate web-safe slug names based on some other part of the content data being edited, such as the title of an article. Manual override is also allowed, but should only be used whenever a specific slug is needed for one reason or another.
Slugs will by default be generated on the format <slug>-<unique-ID> and the output of the widget should always be stored
in the aceSlugInfo type, which is also an ACE Web standard aspect.
Prerequisites
The required ACE type aceSlugInfo is located in ACE Web and needs to be available in the installation:
<dependency>
<groupId>com.atex.ace.web</groupId>
<artifactId>types</artifactId>
<version>${ace-web.version}</version>
<classifier>ace-content</classifier>
</dependency>
Configuration
| Attribute | Description | Default |
|---|---|---|
"allowSlugCustomization" |
booleanWhether to allow manual customization and editing of the slug value. |
true |
"generateSlugId" |
booleanWhether the editor should automatically generate and append a short unique ID string to the slug value. |
true |
Localization
This widget has localization support in the form of the following properties:
aceUISlugEditor.slugIdaceUISlugEditor.missingCustomSlug
Expected domain objects
This widget expects two domain objects:
slugBase: The source for automatically generated slugs. Any change to the data represented by this domain object will result in an updated slug value. The domain object should be of typestring.slugDataAspect: The aspect to store the generated / edited slug information in. Should be of typeaceSlugInfo.
Example template json
{
"label": "Slug",
"widget": "aceUISlugEditor",
"config": {
"generateSlugId": true,
"allowSlugCustomization": true
},
"domainObjects": {
"slugDataAspect": "aceSlugInfo",
"slugBase": "article/title"
}
}