-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
area: slugsstatus: unconfirmedtype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
When using the folder collections path option, the value of slug
becomes that of path
rather than just the slugified version of title
or identifier_field
.
To Reproduce
- Create a collection and set
path
topath: "{{slug}}/_index"
- Define a field for
title
- Create a new record
- In a new collection create a relation widget and reference the original collection and set
valueField: {{slug}}
- Save a record in the new collection
Expected behavior
The value of of the relation widget to be just the slugified version of title
, instead it's the entire path as defined in path
(my-title-slug/_index
).
Screenshots
Applicable Versions:
- Netlify CMS version: 2.10.55
CMS configuration
collections:
- name: "topics"
label: "Topics"
folder: "content/topics"
path: "{{slug}}/_index"
create: true
fields:
- label: "Topic Title"
name: "title"
widget: "string"
hint: "Short, topical, no acronyms."
- name: "events"
label: "Events"
label_singular: "Event"
folder: "content/events"
fields:
- label: "Topics"
name: "topics"
widget: "relation"
collection: "topics"
searchFields: ["title"]
valueField: "{{slug}}"
displayFields: ["title"]
kundanjha101, mvarrieur, rumack, utshomax-zz and pumguy
Metadata
Metadata
Assignees
Labels
area: slugsstatus: unconfirmedtype: bugcode to address defects in shipped codecode to address defects in shipped code