hot fix for template and empty layout on new page creation

This commit is contained in:
Ro 2022-01-04 14:20:19 -08:00
commit dc08f60098

View file

@ -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;