decap-cms
decap-cms copied to clipboard
Customize list view for individual entries in nested collections
Is your feature request related to a problem? Please describe. I have a nested folder collection for a directory tree that also includes a news section. For this section (that works like a blog), I want to use a different format for the list view because here the post date is a vital criteria that should appear in the entry summary and in the sort dropdown. But Netlify currently only lets me configure the whole collection.
Describe the solution you'd like In the nested section, I'd like the ability to define a summary that only applies to specific entries/paths:
config.yml
sortable_fields: ["weight", "title", "commit_date"]
[...]
nested:
depth: 10
summary: '{{title}}'
entries:
- match: 'news'
summary: '{{date}} - {{title}}'
sortable_fields: ["date", "title", "commit_date"]
Describe alternatives you've considered An (inferior) alternative would be to provide exclusion filters to be able to exclude entries from the collection. This way, one could achieve the desired presentation for specific entries with a different collection without duplicating the entry. But this breaks the hierarchical structure.