Skip to content
  1. Extras
  2. PageBuilder
  3. Field types
  4. Free
  5. slug

Field slug

Version: Free.

Why this type

Normalized URL segment, not free-form text. sourceField copies a title on first save. Pro: responsive map excludes alt, caption, slug names.

When to use

  • Section anchor, card slug, filter segment
  • Catalog or landing path segment
  • Tab or in-page navigation key

Tips

Store full URLs in url, not slug. Slug is excluded from the responsive map by default.

Similar types

  • text for the visible source title
  • url for a complete link with protocol

Schema

json
{
  "name": "slug",
  "type": "slug",
  "label": "Slug",
  "sourceField": "title",
  "separator": "-",
  "tab": "Content",
  "width": 100,
  "active": true
}

Value

Slug string.

Section data

Key slug in the section data:

json
{
  "slug": "section-title"
}

Chunk example

html
<span class="slug">{$slug|escape}</span>

Notes

Source: sourceField, slugSource, or alias from. Separator: separator.

Common properties

For fields with name that are stored in the section data:

KeyTypeRoleCMP
tabstringGroup subtitle in the inspectoryes
width25–100Field width as % of the row (flex)yes
descriptionstringHint under the labelyes
defaultanyInitial value for a new sectionyes
activeboolfalse hides the field in the inspectoryes
requiredboolRequired on publish (draft still saves)yes

Pro (capability responsive): with responsive: true, the section data uses desktop, tablet, mobile keys instead of a scalar.

  • Also: sourceField / from, separator. Responsive is disabled for field name slug.

See fields overview.

See also