Hey guys,
is there a way to deactivate the frontend (with URL always to the Panel)? I wanna use only the Panel for create, save and display Data.
Thanks for help
Hey guys,
is there a way to deactivate the frontend (with URL always to the Panel)? I wanna use only the Panel for create, save and display Data.
Thanks for help
Hey Robin,
In /site/config/config.php (create the folder and the file if it doesn’t exist), you can add a route that lead to the panel in any case :
<?php
return [
'routes' => [
[
'pattern' => '/(:all)',
'action' => function () {
go($site->panel()->url());
}
]
]
];
More info concerning routing : Routing | Kirby CMS
Don’t forget to close the subject if the solution works.
For me site() worked instead of $site.
go() could also be used to redirect to a external url like go("https://www.myfallbacksite.com");
<?php
return [
'routes' => [
[
'pattern' => '/(:all)',
'action' => function () {
go(site()->panel()->url());
}
]
]
];