decaporg / decaporg/decap-cms

Customize list view for individual entries in nested collections

Open
#5,792 4 comments 1 reaction 1 assignee Claimed by @philcaz View on GitHub
area: nested-collections type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.