Panel in readonly mode

i need a really quick solution to set the complete panel in readonly mode.

  • all page objects must be readonly, none can be created, deleted, moved, renamed.
  • images, uploads should be disabled too, but not that important.
  • its ok if all buttons are there.
  • i can not change the panelfields in their blueprints.
  • i do not need user permissions, a hack is fine.

i worked with hooks, so maybe just change the function that triggers the hooks?

May I asked for the reason why you are trying to do that? What purpose has a panel where you can’t do anything, you might as well take it offline?

I can see use cases for this and have already found myself in the same situation.

There’s one massive thing that’s missing with Kirby for me its a demo of the backend. Sometimes you must show the backend in demo mode. With Kirby, you must install an instance locally or on a server before you can try anything.

Even on the GetKirby website. I don’t expect to have to download a CMS to test it. The “Try” Section should be able to let me try without having to install.

The opinion expressed above is not meant to be a rant and is only shared for discussion.

@bnomei, I’ve looked and never found a solution. What I ended up doing was create a copy of the website (and panel) that can be shared and I’d just give access to that one… Not ideal.

1 Like

IMHO, demo mode is a bit different. In demo mode, you should probably be able to actually use the panel, only the stuff is not saved. But this is probably off-topic unless @bnomei’s use case is exactly that.

But I was asking for @bnomei’s specific use case (and how it relates to hooks) in order to find some sort of solution.

I may have over simplified @bnomei’s use case. It’s the gut feeling I got from what he was asking.

Well, maybe you are right, we’ll see :slight_smile:

1 Like

i created a frontend with registration and login. users can create content stored as page objects. this content is not public.
the panel can show everything that has been added by users.

the panel pages have custom sorting so content can be added on between.
302-text-c (text b has been removed)

my customer wants to see what has beed added. i do not want him to press save in panel, because this would remove my custom sorting.

changing the sorting would break my front end.

Would hiding the save button help? Or disabling it? And probably also remove the link to the page overview …

Edit: you would also have to disable saving by CMD-S as well.


ah yes. like you said. the pages overview, where sorting by dragndrop is availabe. that should be blocked.

i do not care if the buttons are there or not actually. they just should not do anything.
so can i just stop the panel code before it updates/saves/creates? where would one do this?

to sum it up. for me it would be good enough if the panel is just cut of from creating/updateing content. the gui does not have to change.
this is temporary solution for a month. i can brief the client. i just do not want any accidents to happen. :wink:

As far as I can see, you would have to hack several panel files, the place to look at would be the controllers, e.g. lines 59 - 65 in /panel/app/controllers/pages.php to prevent saving of a page.

panel/app/controllers/subpages.php line 69 for the sorting in panel overview?

Yes, and options.php, line 21 for panel options.

And then test if that really covers everything …

what about panel/app/controllers/subpages.php line 19? index() function.

Yeah, that too, I think.

Best to test this with a copy of your site.

1 Like

Oh, and line 77 subpages.php (hiding)

searching for


proved useful. finds moste cases i needed.

thanks for the help @texnixe.

You are welcome, don’t forget to document all hacks, just saying …:wink: