Welcome Guest, Not a member yet? Register   Sign In
Plenty Parser (Driver Based Template Library, Supports Smarty and Twig Rendering)
#4

[eluser]Vheissu[/eluser]
I know this is a super late reply, but yes there is a way to use Codeigniter helper functions in your templates. You can register their use via the register_plugin function in the Smarty or Twig driver. The Smarty driver should automatically include in-built Codeigniter helper functions from both the system and application helper directories, the Twig driver will shortly as well. I've just made a slew of updates to the library as well, the Twig and Smarty drivers are compatible with the latest version of Codeigniter.

I shorted the driver name from plenty_parser to be just pp. So you go $this->load->driver('pp') and use it like this: $this->pp->parse(), or $this->pp->twig->parse() and so on.


Messages In This Thread
Plenty Parser (Driver Based Template Library, Supports Smarty and Twig Rendering) - by El Forum - 03-01-2012, 09:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB