I'm wondering that how to integrate PHPTAL into yii framework? I'm using PHPTAL for a long time and it's nice template engine. Although Yii allows integrate another template engine into framework but it still does not support PHPTAL.
Thanks for your help.
Have a look at this extension for Smarty template engine: smarty-view-renderer
Basically, you write a Component for Yii that implements
IViewRenderer
. Then overrideinit()
and implementrenderFile()
, and then in yourmain.php
config file, you setviewRenderer
to your Component class. Something like this:and it will work like a charm.
But if you don't insist on PHPTAL, Smarty is there ready for you.