Parent, default,

Hello,

I’m trying to build my site.yml fully from scratch. I would like achieve something like your Kirby Starterkit have – the pages fields, which show particular pages from whole site. I am trying to use:

List_of_some_subpages:
    label: Pages
    type: pages
    parent: site.page("pages")

And I suppose that it will connect this “List_of_some_subpages” field with particular place in files structure (content/1_pages) so the content of this folder will be always shown on the panel site page, but there is always “no pages selected yet”.

There are another properties, like “default”, so it’s possible that I understand it bad, completely. But It seems to work in your Starterkit.

Thank you so much!

Hey and welcome to our forum :slightly_smiling_face:

Could you please post the full blueprint here, because it looks as if you have created a field instead of a section.

Sure!

tabs:
	tab1:
		label: Content
		icon: box
		columns:
			structural:
				width: 1/3
				fields:
					structure_header:
						label: Site structure
						type: headline
					structure_pages:
						label: Pages
						type: pages
						parent: site.page("pages")
			projects:
				width: 2/3
				fields:
					projects_header:
						label: Your Projects
						type: headline
					projects_pages:
						label: Your Projects
						type: pages
						layout: cards
						size: tiny
						parent: site.page("projects")
	tab2:
		label: Settings
		icon: car
		columns:
			metainfo:
				width: 1/2
				fields:
					metaheader:
						label: Meta informations
						type: headline
					metainfo:
						text: |
							 This will be used by various search engines while indexing your webpage for searching purpose.
						type: info
					pagetitle:
						label: Page title
						type: text
					keywords:
						label: Keywords
						type: tags
					description:
						label: Description
						type: textarea
						minlength: 60
						maxlength: 160
						buttons: false
					author:
						label: Author
						type: text
					copyright:
						label: Copyright
						type: text
			footer:
				width: 1/2
				fields:
					footerheader:
						type: headline
						label: Footer contacts
					footerinfo:
						text: |
							 This contacts will shown in footer, which is same for all pages.
						type: info
					phone:
						label: Your Phone number
						type: text
						help: Don’t forget the country code and make some spaces for better readability.
						placeholder: +420 123 456 410
						translate: false
					mail:
						label: Your e-mail
						type: text
						placeholder: name@domain.cz
						translate: false

Ah, ok, you have defined fields here. A field doesn’t have a parent but needs a query, but I think you want a section here. With a pages field, you select pages and the selected pages are stored in site.txt.

The site.yml blueprint of the Starterkit doesn’t have any fields, only sections that list different types of pages.

See also: Kirby in a nutshell | Kirby CMS

Thank you so much for your reply, I will try it in next days and i will let you know!

1 Like

Hi, it was exactly the problem. I didn’t understand differences between fields and sections well. Your link helps me a lot :slight_smile: In general, your documentation is pretty good!

Thank you so much for your support!