Skip to content

Storing slug in hidden field #4022

@fabrizziosoares

Description

@fabrizziosoares

I am trying to store the current slug in a hidden field, but it storing the string "{{slug}".
Follow an excerpt of my code:

name: projects
label: Projects
label_singular: Project
folder: 'content/en/project'
path: '{{slug}}/index'
create: true # Allow users to create new documents in this collection
fields: # The fields each document in this collection have
- {label: "Title Slug", name: "titleslug", widget: "hidden", default: "{{slug}}"}

Is it possible to fix it, please?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions