Slug field

info.magnolia.editor.field.SlugFieldDefinition is a special type of text field provided by the Content Editor module. It creates an editable text field that allows you to adjust the URL of a Content Editor story to a more human-readable form, for example from

example.com/stories/flying-grand-canyon-and-southwest.html

to

example.com/stories/fly-grand-canyon

The same can be achieved with URI mapping, which is a more generic solution. For more details, see the section A user-friendly path vs full path.

The slug field can only be used in the context of the Content Editor module.

Example definition

(Excerpted from the Stories app configuration.)

/stories-app/apps/stories.yaml
datesAndUrl:
...
  properties:
...
    jcrName:
      $type: slugField
      label: URL slug
      placeholder: Add URL slug...

Since the field extends TextFieldDefinition, you can use the text field properties to configure the field.

Related topics
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules