Apart from the fact that your indentation is not correct, it looks like you run into an endless loop if you have the builder create pages with the same default template that in turn builds the same subpages and so on.
title: Default Page Template
pages:
build:
- title: Gallery
uid: gallery
template: gallery
num: 1
- title: Info
uid: info
num: 2
template: info
fields:
title:
label: Title
type: text
text:
label: Text
type: textarea
Adding a new page level 1 Dashboard->Add Page will have always the same template. The structure I’m building is:
Home
Error
About
Name of Person 4 (template person.php)
Name of Person 3 (template person.php)
Name of Person 2 (template person.php)
Name of Person 1 (template person.php)
Basically the only allowed pages to be added on root level will be people and for each person a 2 subpages.
title: Person Template
pages:
template:
- person
build:
- title: Person Sub Page 1
uid: gallery
template: gallery
num: 1
- title: Person Sub Page 2
uid: about
num: 2
template: info
fields:
title:
label: Title
type: text
text:
label: Text
type: textarea
What I’m trying to achieve is to limit the available template choice for the Dashboard Add New Page to only person.yml template. Once that page is created, Kirby to automatically create two sub pages for that page: first called Gallery and the second About. Each of the two subpages to have their own .yml templates.
title: Person Template
pages:
template:
- gallery
- info
build:
- title: Person Sub Page 1
uid: gallery
template: gallery
num: 1
- title: Person Sub Page 2
uid: about
num: 2
template: info
fields:
title:
label: Title
type: text