From db385d938ca7887d94c8cd9c3f95e3ef5a7815f4 Mon Sep 17 00:00:00 2001 From: Ro Date: Tue, 4 Jan 2022 14:19:30 -0800 Subject: [PATCH] not fix for template and empty layout for new page creation --- brain/data/Render.inc.php | 6 +++++- brain/views/dash/start.twig | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/brain/data/Render.inc.php b/brain/data/Render.inc.php index e3b745d..454e925 100644 --- a/brain/data/Render.inc.php +++ b/brain/data/Render.inc.php @@ -75,7 +75,11 @@ class Render $limit = 4; foreach ($pages as $page) { $pageOptions = Sorting::page($page); - $template = $this->theme . "/" . $page["layout"] . ".twig"; + + $layout = $page["layout"]; + //new pages have no layout, so defautl for now + $layout = "page"; + $template = $this->theme . "/" . $layout . ".twig"; if (str_contains($page["layout"], "index")) { $location = "../public/index.html"; $dir = null; diff --git a/brain/views/dash/start.twig b/brain/views/dash/start.twig index dc2e777..9eabc15 100644 --- a/brain/views/dash/start.twig +++ b/brain/views/dash/start.twig @@ -23,5 +23,5 @@ {% endblock %} {% block javascripts %} - + {% endblock %} \ No newline at end of file