fix panel redirection if unlog
This commit is contained in:
parent
173479eaa6
commit
20eb186c37
2 changed files with 5 additions and 8 deletions
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
|
||||
return function ($page, $kirby) {
|
||||
return function ($page, $kirby, $site) {
|
||||
if (!$kirby->user()) {
|
||||
go($site->panel()->url());
|
||||
}
|
||||
$data = $page->toArray();
|
||||
$data['template'] = (string) $page->template();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
<?php snippet('header') ?>
|
||||
<?php
|
||||
if ($kirby->user()) {
|
||||
echo '<div id="app"></div>';
|
||||
} else {
|
||||
go($site->panel()->url());
|
||||
}
|
||||
?>
|
||||
<div id="app"></div>
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue