Skip to content

Commit

Permalink
Support tmpl folder for views in HtmlView
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed May 23, 2017
1 parent a31500a commit bab4352
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libraries/src/CMS/View/HtmlView.php
Expand Up @@ -134,10 +134,18 @@ public function __construct($config = array())
{
$this->_setPath('template', $this->_basePath . '/view/' . $this->getName() . '/tmpl');
}
else
elseif (is_dir($this->_basePath . '/tmpl/' . $this->getName()))
{
$this->_setPath('template', $this->_basePath . '/tmpl/' . $this->getName());
}
elseif (is_dir($this->_basePath . '/views/' . $this->getName() . '/tmpl'))
{
$this->_setPath('template', $this->_basePath . '/views/' . $this->getName() . '/tmpl');
}
else
{
$this->_setPath('template', $this->_basePath . '/views/' . $this->getName());
}

// Set the default helper search path
if (array_key_exists('helper_path', $config))
Expand Down

0 comments on commit bab4352

Please sign in to comment.