Collection views
view controls how a collection's entries are listed. Without it, Pages CMS lists each entry by its primary field.
- name: posts
type: collection
path: content/posts
view:
fields: [title, author.name, date, draft]
primary: title
sort: [date, title]
search: [title, tags]
default:
sort: date
order: descKeys
Tree layout
For content organized as nested folders, such as documentation, layout: tree shows entries as an expandable tree. Each folder is represented by a node file inside it:
view:
layout: tree
node:
filename: index.md
hideDirs: nodesfilename: the file that represents its folder, such asindex.mdor_index.md.node: index.mdis shorthand.hideDirs: hide folders that have a node file (nodes), that don't (others), orall.