-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
area: slugstype: featurecode contributing to the implementation of a feature and/or user facing functionalitycode contributing to the implementation of a feature and/or user facing functionality
Description
I'd like to inject a "Game or Event Year" into the slug. Rather than creating fields for day and year, I'd like to be able to strip the year from the single "Event Date" field entry and use that in my slug.
Basically exactly what you have done for summaries: https://www.netlifycms.org/docs/beta-features/#summary-string-template-transformations.
collections:
- label: "Games"
name: "games"
folder: "content/games"
create: true
identifier_field: gamenumber
slug: 'game-{{gamenumber}}-{{opponent.teamname}}-{{gamedate | date('YYYY')}}' <-- something like that
format: 'json'
fields:
- {label: "Game Number", name: "gamenumber", widget: "string"}
- {label: "Game Date", name: "gamedate", widget: "datetime"}
SimpleCreations, bcnubes, mffap, rizadh, p4r4noj4 and 4 moreerezrokah, artt and Protonull
Metadata
Metadata
Assignees
Labels
area: slugstype: featurecode contributing to the implementation of a feature and/or user facing functionalitycode contributing to the implementation of a feature and/or user facing functionality