Hi all,
First of all, I’m new to both Yii and Smarty.
I’m having a problem with converting the CRUD generated view (_view.php) to a Smarty template (_view.tpl). Basically, I want to remove all PHP codes from the php file (e.g <?php echo CHtml::encode($data->getAttributeLabel(‘name’)); ?>).
I can’t get the $data variable and associated values. I’ve tried setting some Smarty variable in _view.tpl with the PHP code above but it’s not evaluated. I’ve seen there’s a {php} tag which I’m not willing to use since it’s deprecated.
Any ideas ?