Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder collection path based on fields #7192

Open
snimavat opened this issue Apr 29, 2024 · 0 comments
Open

Folder collection path based on fields #7192

snimavat opened this issue Apr 29, 2024 · 0 comments
Labels
type: bug code to address defects in shipped code

Comments

@snimavat
Copy link

snimavat commented Apr 29, 2024

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

@snimavat snimavat added the type: bug code to address defects in shipped code label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

1 participant