Hi,
I can create subpage with a pages preset in my blueprint, but I don’t start from a preset.
With a type: pages
, is it possible to create page from the panel (not a related, just a new) ?
You mean, what element you need to use to be able to create subpages of a given page? Then a section with the parent property set to this page is the way to go.
You can find examples in the Starterkit and in the docs.
Thank you Pixelijn,
Starterkit uses preset page…
I have this :
I want this :
The first is a field, you want a section
For example:
# The site blueprint usually provides easy access to all main pages of the site.
# In this example blueprint, we also show subpages of the `photography` and `notes` pages.
# More about the site blueprint: https://getkirby.com/docs/reference/panel/blueprints/site
# The layout of this form has two columns:
columns:
# The first column has one section for the subpages of the `photography` page in card layout
# It reuses the pages section defined in `/site/blueprints/sections/albums.yml`
- width: 1/2
sections:
albums: sections/albums
# The second column has two sections, `notes` and `pages`
- width: 1/2
sections:
# The `notes` section reuses the pages section defined in `/site/blueprints/sections/notes.yml`
notes: sections/notes
# The `pages` pages section shows other main pages of the site
# Using the `templates` option, we limit which types of pages are shown
Where the section itself is defined in
# This section blueprint defines a pages section that can be reused across multiple blueprints
# or multiple times within the same blueprint, see `/site/blueprints/pages/photography.yml` and `/site/blueprints/site.yml`
# Sections can have different layouts and display additional information or a preview image
# More about pages sections: https://getkirby.com/docs/reference/panel/sections/pages
type: pages
headline: Photography
parent: kirby.page("photography")
size: small
info: "{{ page.images.count }} image(s)"
layout: cards
template: album
empty: No albums yet
image:
query: page.cover
cover: true
ratio: 5/4
The Starterkit only used preset
in default.yml.
1 Like
I need to read the manual… Not easy to understand this part for me.