Skip to content

Commit

Permalink
Fix for modular page preview #2066
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Jun 20, 2018
1 parent 7d215f9 commit 578e129
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v1.4.7
## mm/dd/2018

1. [](#bugfix)
* Fix for modular page preview [#2066](https://github.com/getgrav/grav/issues/2066)

# v1.4.6
## 06/20/2018

Expand Down
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 @@ -238,7 +238,7 @@ public function processPage(Page $item, $content = null)
// Process Modular Twig
if ($item->modularTwig()) {
$twig_vars['content'] = $content;
$extension = $this->grav['uri']->extension();
$extension = $item->templateFormat('html');
$extension = $extension ? ".{$extension}.twig" : TEMPLATE_EXT;
$template = $item->template() . $extension;
$output = $content = $local_twig->render($template, $twig_vars);
Expand Down

0 comments on commit 578e129

Please sign in to comment.