Sorry for the long delay in posting a reply - I have been extremely
busy lately with work.
A plugin is exactly the way to do it. The only difference from what
you have done is you should use the "addMethod" Kernel method with a
callback instead of setting a new property on the Kernel.
So instead of this:
--
#Add it to the kernal
if(!isset($kernel->smarty))
$kernel->smarty = $smarty;
Do this:
--
$kernel->addMethod('smarty', function() use($smarty) {
return $smarty;
});
Then call it where you want to use it like this:
return $kernel->smarty()->fetch('sometemplate.tpl');
--
Vance Lucas
> *Create a Plugin in the apps dir as:*
> app/Plugin/Smarty
> app/Plugin/Smarty/lib
>
> *Drop Smarty into the new lib folder just created*
>
> *Create the following Plugin.php and place it in the new Smarty folder just
> created*