-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
area: nested-collectionstype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
In nested collections, the sidebar (collection tree) displays folder names based on the title field from the first markdown file's frontmatter within that folder, rather than showing the actual directory name. if nested.summary is set to {{dirname}}, it shows the complete path of the folder instead of immediate folder name.
To Reproduce
- Create 2 files, one with Folder1/file1.md and another with Folder1/file2.md. Add a
titlein frontmatter of one of the files. e.g.title: File. - Open Decap CMS with provided config
- See the sidebar shows the title of the first markdown file instead of the folder name.
Expected behavior
The names in sidebar(collection tree) should display the folder names. Provide a template to pass to nested.summary.
Screenshots
Applicable Versions:
- Decap CMS version: 3.8.4
- Git provider: Azure
- OS: Ubuntu 24
- Browser version: Chrome Version 141.0.7390.108 (Official Build) (arm64)
CMS configuration
publish_mode: simple
site_url: https://docs.example.com
display_url: https://docs.example.com
show_preview_links: false
media_folder: "docs-site/static/.attachments/"
public_folder: "/.attachments"
collections:
- name: "docs"
label: "docs"
folder: docs-site
create: true
extension: 'md'
summary: "{{dirname}}/{{filename}}.{{extension}}"
fields:
- { label: "Title", name: "title", widget: "string", required: false }
- { label: "Body", name: "body", widget: "markdown", required: false }
- { label: "Sidebar position", name: "sidebar_position", widget: number, value_type: int }
- { label: "Tags", name: "tags", widget: "list", required: false }
nested:
depth: 10
subfolders: false
sortable_fields: ['commit_date', 'title', 'commit_author', 'sidebar_position']Metadata
Metadata
Assignees
Labels
area: nested-collectionstype: bugcode to address defects in shipped codecode to address defects in shipped code