From 85253d91c2e832977dac28a673559b3c90709e9a Mon Sep 17 00:00:00 2001 From: Glenn McLelland Date: Thu, 2 Mar 2017 15:27:41 -0600 Subject: [PATCH 1/2] Lower hook priority so this module runs after Page::render and before other modules that use Page::render to add markup to pages As requested from https://github.com/wanze/TemplateEngineFactory/pull/2 here you go. --- TemplateEngineFactory.module.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TemplateEngineFactory.module.php b/TemplateEngineFactory.module.php index dbfa781..bd39065 100755 --- a/TemplateEngineFactory.module.php +++ b/TemplateEngineFactory.module.php @@ -78,7 +78,7 @@ public function ready() return; } $this->wire($this->get('api_var'), $engine); - $this->addHookAfter('Page::render', $this, 'hookRender'); + $this->addHookAfter('Page::render', $this, 'hookRender', array('priority'=>'100.01')); // If the engine supports caching, attach hooks to clear the cache when saving/deleting pages if (in_array('TemplateEngineCache', class_implements($engine))) { $this->wire('pages')->addHookAfter('save', $this, 'hookClearCache'); From f67b4b2499a3ffebe4e079c5e8b0bb8e063300a0 Mon Sep 17 00:00:00 2001 From: Stefan Wanzenried Date: Sat, 11 Mar 2017 21:41:08 +0100 Subject: [PATCH 2/2] Bump version number --- TemplateEngineFactory.module.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TemplateEngineFactory.module.php b/TemplateEngineFactory.module.php index bd39065..3d24fcb 100755 --- a/TemplateEngineFactory.module.php +++ b/TemplateEngineFactory.module.php @@ -15,7 +15,7 @@ * * @author Stefan Wanzenried * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License, version 2 - * @version 1.1.0 + * @version 1.1.1 */ class TemplateEngineFactory extends WireData implements Module, ConfigurableModule { @@ -78,7 +78,7 @@ public function ready() return; } $this->wire($this->get('api_var'), $engine); - $this->addHookAfter('Page::render', $this, 'hookRender', array('priority'=>'100.01')); + $this->addHookAfter('Page::render', $this, 'hookRender', array('priority' => '100.01')); // If the engine supports caching, attach hooks to clear the cache when saving/deleting pages if (in_array('TemplateEngineCache', class_implements($engine))) { $this->wire('pages')->addHookAfter('save', $this, 'hookClearCache'); @@ -282,7 +282,7 @@ public static function getModuleInfo() { return array( 'title' => 'Template Engine Factory', - 'version' => 110, + 'version' => 111, 'author' => 'Stefan Wanzenried', 'summary' => 'This module aims to separate logic from markup.' . 'Turns ProcessWire templates into controllers which can interact over a new API ' .