Skip to content
Snippets Groups Projects
Commit 9a7aa12d authored by Guy Halse's avatar Guy Halse
Browse files

Allow themes to call their parent templates

parent e9b88a17
No related branches found
No related tags found
No related merge requests found
...@@ -244,6 +244,7 @@ class Template extends Response ...@@ -244,6 +244,7 @@ class Template extends Response
$templateDirs[] = [ $templateDirs[] = [
$this->theme['module'] => TemplateLoader::getModuleTemplateDir($this->theme['module']) $this->theme['module'] => TemplateLoader::getModuleTemplateDir($this->theme['module'])
]; ];
$templateDirs[] = ['__parent__' => TemplateLoader::getModuleTemplateDir($this->module)];
} catch (\InvalidArgumentException $e) { } catch (\InvalidArgumentException $e) {
// either the module is not enabled or it has no "templates" directory, ignore // either the module is not enabled or it has no "templates" directory, ignore
} }
...@@ -524,7 +525,7 @@ class Template extends Response ...@@ -524,7 +525,7 @@ class Template extends Response
public function show() public function show()
{ {
if ($this->useNewUI) { if ($this->useNewUI) {
echo $this->getContents(); echo $this->getContents();
} else { } else {
require($this->findTemplatePath($this->template)); require($this->findTemplatePath($this->template));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment