Edit on GitHub
Jump to docs navigation

Field Types / Slug field

Note: You are currently reading the documentation for Bolt 4.0. Looking for the documentation for Bolt 3.7 instead?

This field will determine what "slug" or permalink is used for accessing the record on the frontend. When omitted, the slug will be automatically generated.

Tip: The slug is a special value that's used in the generation of the URL at which a page will be available on the website. It usually contains a variant of the title, that's been made suitable for indexing by search engines. Ideally, it is both semantic and human-readable. For example, if you have a page named "About our company", a good slug would be about-our-company.

Basic Configuration

            type: slug
            uses: title

Example usage in templates

The slug is not often used by itself, but rather as a part of a link. You can print the link to a record like this:

{{ record|link }}

{{ record|link(true) }}

The second example will output a canonical link to the record. This means that the link will include the full scheme, hostname and path, like https://example.org/page/about-us.

You can also just output the slug like this:

{{ record.slug }}


The field has one option to change the functionality of the field:

  • uses determines what field(s) are used to build the slug. Usually you want this set to the textfield that you use as the title, (often called title), but you can also use it with multiple fields like for example [title, subtitle].

Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.