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
|
<?php
|
||||||
|
|
||||||
return function ($page, $kirby) {
|
return function ($page, $kirby, $site) {
|
||||||
|
if (!$kirby->user()) {
|
||||||
|
go($site->panel()->url());
|
||||||
|
}
|
||||||
$data = $page->toArray();
|
$data = $page->toArray();
|
||||||
$data['template'] = (string) $page->template();
|
$data['template'] = (string) $page->template();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,3 @@
|
||||||
<?php snippet('header') ?>
|
<?php snippet('header') ?>
|
||||||
<?php
|
<div id="app"></div>
|
||||||
if ($kirby->user()) {
|
|
||||||
echo '<div id="app"></div>';
|
|
||||||
} else {
|
|
||||||
go($site->panel()->url());
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php snippet('footer') ?>
|
<?php snippet('footer') ?>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue