I want the users to be able to add a page only in a particular sub folder i.e. site.co.uk/books/book.
Is this possible and can anyone tell me how I achieve this please?
Kirby has the concept of pages section where you define a parent page and the allowed templates/blueprint for subpages under this page, e.g.
sections:
type: pages
headline: Books
parent: kirby.page('books')
layout: cards # or list or cardlets
You can put this section in your site.yml
so that it appears directly on the dashboard, and into the parent books page blueprint.
Other sections should then not be allowed to use this blueprint to create pages.
Or do you mean that adding pages shouldn’t be possible anywhere else?
Then you can set create: false
on a pages section:
sections:
pages:
type: pages
create: false # prevent adding pages to this section
templates:
- about
- home
- default
Yes, that’s exactly what I was meaning, thank you. It seems to be working fine now.