Slug 

The Slug type generates a slug field, which generates a unique string for the record.

Settings 

eval

eval
Type
string

unique, uniqueInSite or uniqueInPid.

searchable

searchable
Type
boolean
Default
true

If set to false, the field will not be considered in backend search.

generatorOptions.fields

generatorOptions.fields
Type
array

An array of fields to use for the slug generation. Adding multiple fields to the simple array results in a concatenation. In order to have fallback fields, a nested array must be used.

Example:

generatorOptions:
  fields:
    - header
Copied!

generatorOptions.fieldSeparator

generatorOptions.fieldSeparator
Type
string

Separator placed between slug parts built from multiple fields. If a field value contains this character, it is replaced by fallbackCharacter.

generatorOptions.prefixParentPageSlug

generatorOptions.prefixParentPageSlug
Type
boolean

Prepends the parent page slug to the generated slug. Only applies to page records.

generatorOptions.postModifiers

generatorOptions.postModifiers
Type
array

List of PHP class names that are called after slug generation to apply custom modifications.

generatorOptions.regexReplacements

generatorOptions.regexReplacements
Type
object

Key-value pairs for regex-based string replacement applied during slug generation. Keys are patterns, values are replacements.

generatorOptions.replacements

generatorOptions.replacements
Type
object

Key-value pairs for plain string replacement applied to slug parts.

appearance.prefix

appearance.prefix
Type
string

A user function that provides a string displayed in front of the input field.

behaviour.allowLanguageSynchronization

behaviour.allowLanguageSynchronization
Type
boolean
Default
false

Allows to select if localization uses custom or default language value.

default

default
Type
string

Default value set if a new record is created.

fallbackCharacter

fallbackCharacter
Type
string

Character used as a replacement when a slug section contains the generatorOptions.fieldSeparator.

fieldControl

fieldControl
Type
object

fieldInformation

fieldInformation
Type
object

fieldWizard

fieldWizard
Type
object

prependSlash

prependSlash
Type
boolean

Whether the slug field should contain a leading slash. Useful for nested records with speaking URL segments.

readOnly

readOnly
Type
boolean
Default
false

Renders the field in a way that the user can see the value but cannot edit it.

size

size
Type
integer
Default
30

Abstract width of the input field. Minimum 10, maximum 50.

Examples 

Minimal 

name: example/slug
fields:
  - identifier: slug
    type: Slug
    eval: unique
    generatorOptions:
      fields:
        - header
Copied!

Advanced / use case 

name: example/slug
fields:
  - identifier: slug
    type: Slug
    eval: unique
    generatorOptions:
      fields:
        -
          - header
          - fallbackField
        - date
Copied!