Skip to content

Commit

Permalink
Minor fix for adding custom page vars if page template file cannot be…
Browse files Browse the repository at this point in the history
… found
  • Loading branch information
mahagr committed May 18, 2017
1 parent f3cecd8 commit 5a93fcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Twig/Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public function processSite($format = null, array $vars = [])
if ($ext != '.html' . TWIG_EXT) {
try {
$page->templateFormat('html');
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $twig_vars);
$output = $this->twig->render($page->template() . '.html' . TWIG_EXT, $vars + $twig_vars);
} catch (\Twig_Error_Loader $e) {
throw new \RuntimeException($error_msg, 400, $e);
}
Expand Down

0 comments on commit 5a93fcf

Please sign in to comment.