How to make a collection page from Admin window

I am making a site with a lot of collection pages in a tree. The Admin panel allows me to add a new Page, but to make it a collection page the front matter needs to contain the lines

content:
   items: '@self.children' 

Do I have to add those lines by hand to every collection page, or can it be done from the Admin panel, maybe by some appropriate blueprinting?

I have added the following to my page blueprints under an appropriate tab:

header.content.items:                                                        
  type: text
  label: Collection source
  default: '@self.children'

Adding this to the blueprint will not automatically add the default fields to existing pages. But the next time you open the page in the admin and save it. It will populate the field. You will also be able to edit the items: field to another value, like '@root.descendants'.

1 Like

Hi
you use a specifique theme ?

I have developed my own theme which is a part of something I call the photon PLATFORM - an integrated suite of tools of open source tools for developing, publishing and managing complex hierarchical content sets.

More to come…

Oops sorry @phi the question is for @ThosGreen :wink:
Myself i developed my own theme for my specific work

1 Like

@phi That’s a clever idea, thanks for passing it on. Should solve the problem.

@Kit No, I’m just an amateur trying to get things done quickly, not a keen developer. Creating my own theme might be interesting but it would take a lot of time that I want to use elsewhere. So I rely on other people, with more skills and experience, developing themes and being kind enough to make them public.