Slug 

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

Settings 

Name Type Default Required
string
boolean true
array

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

generatorOptions
Type
array

Options related to the generation of the slug. Keys:

fields (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!

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!