aboutsummaryrefslogtreecommitdiffstats
path: root/Controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'Controller.php')
-rw-r--r--Controller.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Controller.php b/Controller.php
index 458d3a3..5e14f4b 100644
--- a/Controller.php
+++ b/Controller.php
@@ -31,7 +31,10 @@ class Controller
if ($id) {
return $this->get($id);
}
+
+ $this->view = new MainView();
return $this;
+
}
/**
@@ -349,8 +352,9 @@ class Controller
$tpl_contents = ob_get_contents();
ob_end_clean();
+ $title = ($this->pageTitle) ? $this->pageTitle : App::conf("defaults.title");
$tpl_contents = preg_replace(
- '/<title>.*?<\/title>/', "<title>{$this->pageTitle}</title>", $tpl_contents
+ '/<title>.*?<\/title>/', "<title>{$title}</title>", $tpl_contents
);
echo str_replace('%%page_content%%', $view_contents, $tpl_contents);