Custom directory structure / Changing location of the Panel dir

Hi everybody,

I’ve been trying to set up a directory structure like this for a current project:

 +–– web/
     +—— app
     |    +—— assets/
     |    +—— kirby/
     |    +—— panel/
     |    +—— …
     +—— data/
     |    +—— accounts/
     |    +—— avatars/
     |    +—— content/
     |    +—— thumbs/
     |    +—— …
     +—— index.php

I’ve set up almost all paths correctly and everything seems to be working alright, except the panel. It seems that the location of the panel folder is somehow hardcoded, so I was able to fix this removing the app directory from the path in the Panel’s launch()-method . However, I’d rather like to solve this in a more elegant way.


–387    $this->path  = $this->kirby->path();
+387    $this->path  = explode('/', $this->kirby->path);
+388    unset($this->path[0]);
+389    $this->path  = implode('/', $this->path);

Did anybody else try to accomplish something similar? Or is this simply not possible right now? If so, are there any severe reasons not to implement this (obviously in a cleaner and a more generally applicable way)?

Thanks in advance for your help! :slight_smile:

Edit: I tried solving this by adding custom rewrite settings, however Kirby depends on the actual directory structure. (Or I’ve been doing something wrong… ;))

As far as I can see, you can customize all roots, probably not the Panel.

Thanks for your reply, @texnixe! Yep, I know that section in the docs…

Do you know if there’s any reason why the path to the Panel directory is currently not customizable? If not, I’d create an issue on GitHub so that this can be considered for future releases.

No, I don’t know why this is the case. If you create a feature request issue on GitHub, maybe we will learn more or will have that feature in the future.

I have created an issue on GitHub and will update this post if there are any news :slight_smile: