# How to Stop User Adding Top-Level Pages/Sections to a Site?

**URL:** <https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777>\
**Category:** Questions\
**Tags:** v2\
**Created:** [April 12, 2015, 6:47am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777 "2015-04-12T06:47:43Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![luxlogica](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/luxlogica/32/437_2.png) [@luxlogica](https://forum.getkirby.com/u/luxlogica)\
**Post date:** [April 12, 2015, 6:47am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/1 "2015-04-12T06:47:43Z")

</div>

Hi all! Newbie here…

I’m trying to create a simple site where the user should **not** be able to add pages to the top-level of the site. The user should be able to change the **content** of existing pages, but not add or delete the pages themselves. The site will have pre-defined sections, and the user should not be able to delete or add to those. The site will also have a Blog section, which is the only section where the user should be able to add/delete pages (articles).

By default, in the starterkit, the Panel allows users to add/delete pages at will, at the top level. Is there a way to stop or control that?

Many thanks in advance for any guidance.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 12, 2015, 7:59am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/2 "2015-04-12T07:59:24Z")

</div>

You can set that in the site.php blueprint. Just add `pages: false`.

---

<div class="post-metadata">

**Author:** ![luxlogica](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/luxlogica/32/437_2.png) [@luxlogica](https://forum.getkirby.com/u/luxlogica)\
**Post date:** [April 12, 2015, 8:18am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/3 "2015-04-12T08:18:12Z")

</div>

@texnixe Many thanks! It does work, although it is not an ‘elegant’ solution: the “edit” and “add” buttons still appear in the dashboard, as well as the ‘pages’ link button. Is there a simple way to hide or disable these buttons when the user is on the top-level?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 12, 2015, 8:21am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/4 "2015-04-12T08:21:59Z")

</div>

You could add some custom panel css and hide the buttons?

Add in config.php

```auto
c::set('panel.stylesheet', 'assets/css/custompanel.css');

```

---

<div class="post-metadata">

**Author:** ![bastianallgeier](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bastianallgeier/32/7569_2.png) [@bastianallgeier](https://forum.getkirby.com/u/bastianallgeier)\
**Post date:** [April 12, 2015, 1:28pm UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/5 "2015-04-12T13:28:29Z")

</div>

This is just due to a bug, which is fixed in 2.1.

---

<div class="post-metadata">

**Author:** ![luxlogica](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/luxlogica/32/437_2.png) [@luxlogica](https://forum.getkirby.com/u/luxlogica)\
**Post date:** [April 13, 2015, 10:20pm UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/6 "2015-04-13T22:20:19Z")

</div>

Thank you for all the wonderful work in Kirby!

It’s exciting to hear that more granular permissions are being developed.

Even in 2.1, it seems this use-case is not fully covered. In Kirby, `pages: false` completely hides subpages from the Panel, making it impossible for the user to edit them. On the other extreme, `pages: true` gives permission not just to edit existing subpages, but also to create and delete them. What is needed here is the ability to **“edit only”** existing pages, but not create/delete - perhaps a `pages: editonly` setting?

Also, in the current 2.1 beta, setting `pages: false` in the _site.php_ blueprint hides the ‘Add’ button from the interface, but still leaves both the ‘Edit’ and the ‘Pages’ buttons. Clicking these presents the user with an error message, saying the page could,not be found. It doesn’t seem like this is the intended behavior.

Once again, many thanks for all the work that is being put into Kirby - it’s an amazing piece of software, and your work is truly appreciated!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 13, 2015, 10:32pm UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/7 "2015-04-13T22:32:58Z")

</div>

Maybe I don’t quite understand, but setting `pages: false` in site.php still leaves the pages editable? You just can’t add any new ones. And in 2.1 beta, the add link is gone as well.

You are right though as regards the unnecessary link: The “Pages” link is still there and leads to an error message when clicked.

---

<div class="post-metadata">

**Author:** ![luxlogica](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/luxlogica/32/437_2.png) [@luxlogica](https://forum.getkirby.com/u/luxlogica)\
**Post date:** [April 14, 2015, 12:24am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/8 "2015-04-14T00:24:10Z")

</div>

> [@texnixe](#):
>
> Maybe I don’t quite understand, but setting pages: false in site.php still leaves the pages editable? You just can’t add any new ones. And in 2.1 beta, the add link is gone as well.

Yes, this works fine for the _site.php_ - but unfortunately we would not be able to get the same result with a ‘normal’ blueprint anywhere else on the site. Setting `pages: false` anywhere else completely hides the subpages list from the Panel.

> [@texnixe](#):
>
> The “Pages” link is still there and leads to an error message when clicked.

And the ‘Edit’ button - the one that normally appears next to the ‘Add’ button - also still remains, issuing the same error…

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 14, 2015, 6:03am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/9 "2015-04-14T06:03:38Z")

</div>

Oh, I see what you mean. Instead of `pages: false`, on the subpages you can set a max value, once that value is reached, users cannot add any more pages while the pages are still editable. So if you set that value to the number of pages you have already created, you should achieve what you want?

---

<div class="post-metadata">

**Author:** ![luxlogica](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/luxlogica/32/437_2.png) [@luxlogica](https://forum.getkirby.com/u/luxlogica)\
**Post date:** [April 14, 2015, 7:08am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/10 "2015-04-14T07:08:05Z")

</div>

Almost… because the users can still **delete** existing pages. And once they delete a page, they will be able to add pages again…

This is specially cumbersome when creating sites with pages made up of ‘block sections’ - where each ‘block’ is really a sub-page. You **can** make-do with the way things are now, just trusting that the users will not (accidentally) delete or add sections at will…

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 14, 2015, 9:35am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/11 "2015-04-14T09:35:54Z")

</div>

You can use: `deletable: false` in your blueprints to prevent accidental deletion of pages. In the pages overview, you will still see the delete button, but it won’t work anymore.

---

<div class="post-metadata">

**Author:** ![luxlogica](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/luxlogica/32/437_2.png) [@luxlogica](https://forum.getkirby.com/u/luxlogica)\
**Post date:** [April 14, 2015, 11:00am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/12 "2015-04-14T11:00:43Z")

</div>

Oooh, I’ll have to try this out - many thanks for the guidance, @texnixe!

---

<div class="post-metadata">

**Author:** ![mxdvl](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mxdvl/32/6552_2.png) [@mxdvl](https://forum.getkirby.com/u/mxdvl)\
**Post date:** [June 7, 2018, 7:52am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/13 "2018-06-07T07:52:36Z")

</div>

A quick note after trying both of the following and was still able to delete the page:

- `deletable: false`
- `delete: false` ([as suggested in the docs](https://getkirby.com/docs/panel/blueprints/page-settings#prevent-page-deletion))

The `delete: false` should be part under `options:` for it to work, but the docs seem to suggest that it can only be written at the top-level of the YAML blueprint.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 7, 2018, 8:48am UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/14 "2018-06-07T08:48:07Z")

</div>

The correct setting seems to be either:

```auto
options:
  delete: false

```

or

```auto
pages: true
deletable: false

```

i.e. outside of the options

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:28pm UTC](https://forum.getkirby.com/t/how-to-stop-user-adding-top-level-pages-sections-to-a-site/777/15 "2025-02-06T17:28:01Z")

</div>


