Skip to content

Commit

Permalink
wrapped pageTitle import into a condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nt0r committed Apr 12, 2013
1 parent 212f700 commit e554ca8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion views/twig.php
Expand Up @@ -102,7 +102,11 @@ function __construct(&$controller, $register = true) {
parent::__construct($controller, $register);
$this->twigPluginPath = dirname(dirname(__FILE__)) . DS;
$this->twigExtensionPath = $this->twigPluginPath . 'extensions';
$this->pageTitle = $controller->pageTitle;

// import page title, if assigned the old way
if (isset($controller->pageTitle)) {
$this->pageTitle = $controller->pageTitle;
}

// import plugin options
$appOptions = Configure::read('TwigView');
Expand Down

0 comments on commit e554ca8

Please sign in to comment.