forked from projects/fipamo
quick patch to render class for dynamic theme rendering
This commit is contained in:
parent
f3dfd3411a
commit
95aecde73b
1 changed files with 5 additions and 4 deletions
|
@ -15,6 +15,7 @@ class Render
|
|||
$this->twig = new \Twig\Environment($this->loader, []);
|
||||
$settings = $config->getSettings();
|
||||
$this->menu = $settings["menu"];
|
||||
$this->theme = $settings["global"]["theme"];
|
||||
$this->pageInfo = [
|
||||
"keywords" => isset($settings["global"]["keywords"])
|
||||
? $settings["global"]["keywords"]
|
||||
|
@ -104,7 +105,7 @@ class Render
|
|||
//$cleaned = html_entity_decode($cleaned, ENT_QUOTES, "UTF-8");
|
||||
|
||||
if ($page["layout"] == "index") {
|
||||
$template = "fipamo-default/index.twig";
|
||||
$template = $this->theme . "/index.twig";
|
||||
$location = "../public/index.html";
|
||||
$dir = null;
|
||||
|
||||
|
@ -119,7 +120,7 @@ class Render
|
|||
"menu" => $this->menu,
|
||||
];
|
||||
} else {
|
||||
$template = "fipamo-default/page.twig";
|
||||
$template = $this->theme . "/page.twig";
|
||||
$location =
|
||||
"../public/" . $page["path"] . "/" . $page["slug"] . ".html";
|
||||
$dir = "../public/" . $page["path"];
|
||||
|
@ -142,7 +143,7 @@ class Render
|
|||
public function renderArchive()
|
||||
{
|
||||
$archive = Sorting::archive();
|
||||
$template = "fipamo-default/archive.twig";
|
||||
$template = $this->theme . "/archive.twig";
|
||||
$pageOptions = [
|
||||
"title" => "Archive",
|
||||
"background" => $this->pageInfo["image"],
|
||||
|
@ -160,7 +161,7 @@ class Render
|
|||
{
|
||||
$list = Sorting::tags();
|
||||
foreach ($list as $item) {
|
||||
$template = "fipamo-default/tags.twig";
|
||||
$template = $this->theme . "/tags.twig";
|
||||
$pageOptions = [
|
||||
"title" => "Pages Tagged as " . $item["tag_name"],
|
||||
"background" => $this->pageInfo["image"],
|
||||
|
|
Loading…
Reference in a new issue