Skip to content

Folder collection path based on fields #7192

@snimavat

Description

@snimavat

We can specify path template for a folder collection - as described in docs here :
Docs says, it supports template syntax similar to slug templates
Slug templates allows use of fields

We would like to organise content based on value of certain fields (including relation type fields)

Example : City collection, with a relation field for state
We would like to configure path for cities collection as path: '{{fields.state.name}}/{{slug}}'
So that the content would be saved as shown below

- state1
   --- city1.md
   --- city2.md
- state2
   --- city3.md
   --- city4.md

But looks like, folder collection path template doesnt allow use of fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featurecode contributing to the implementation of a feature and/or user facing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions