diff --git a/brain/controller/DashControl.php b/brain/controller/DashControl.php index 521900a..13b0921 100644 --- a/brain/controller/DashControl.php +++ b/brain/controller/DashControl.php @@ -112,6 +112,9 @@ class DashControl case 'edit': $page = (new Book())->findPageById($uuid); $views = []; + if (!isset($page['layout'])) { + $page['layout'] = "page"; + } if (str_contains($page['layout'], 'index')) { $views = (new Themes())->getCustomIndex(); } else { diff --git a/brain/data/Render.php b/brain/data/Render.php index d0be3a6..9ed923b 100644 --- a/brain/data/Render.php +++ b/brain/data/Render.php @@ -107,7 +107,7 @@ class Render } $template = $layout . '.twig'; - if (str_contains($page['layout'], 'index')) { + if (str_contains($layout, 'index')) { $location = '../public/index.html'; $dir = null; } else {