Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smarty and Kohana

Is there a standard "official" way of using Smarty with Kohana 3? I see there are some options that seem less than ideal and will probably break when either Smarty or Kohana's minor version number increases.

(as a side question, is it a good idea to use Smarty with Kohana? I'm only trying to have it installed because I'm very familiarized with Smarty and I'm afraid Kohana won't provide all the stuff I love about Smarty..)

like image 418
cambraca Avatar asked Dec 16 '10 03:12

cambraca


2 Answers

Ko3 supports plain php views "from the box", any other template engine can be added as module. This is "standard official" way to extend Ko3 framework features.

If you need a better module, you can modify/extend existing one for your purposes. A lot of people are using templates like Smarty, Dwoo, Twig etc, so dont afraid ;)

like image 80
biakaveron Avatar answered Oct 18 '22 15:10

biakaveron


You will need to use or create a module that overrides the built in Kohana::View. There is an existing module already available so you don't need to create one yourself:

KSmarty: https://bitbucket.org/dfox/ksmarty/wiki/Home

like image 22
RustyFluff Avatar answered Oct 18 '22 16:10

RustyFluff