Skip to content
This repository has been archived by the owner on Mar 24, 2018. It is now read-only.

Commit

Permalink
fix theme template check
Browse files Browse the repository at this point in the history
  • Loading branch information
james2doyle committed Jan 28, 2014
1 parent 67080a6 commit e17b8e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Phile/Template/Lex.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public function render() {

Event::triggerEvent('template_engine_registered', array('engine' => &$parser));

if ($this->page->getMeta()->get('template') !== null && file_exists(THEMES_DIR . $this->page->getMeta()->get('template').'.html')) {
$file = $twig_vars['theme_dir']. '/' . $this->page->getMeta()->get('template').'.html';
if ($this->page->getMeta()->get('template') !== null && file_exists($file)) {
$template = $this->page->getMeta()->get('template');
} else {
$template = 'index';
Expand Down

0 comments on commit e17b8e0

Please sign in to comment.