Friday, 30 August 2013

PHP yii seperating mark up code

PHP yii seperating mark up code

I am pretty new to web programming and I am using PHP Yii as the MVC
framework. I have the view pages in which I get the required data from
model or controller. And when I want to design some layout in the view(say
a list of divs) with the data coming from Yii::Model::MyModel::FindAll().
The data from the model is represented in the list of divs. I am currently
doing this with mixing server side code and HTML(using tags) and it looks
ugly. Is there a better way to do this?
I did some web programming 10 years before and I used this technique with
jsp and is there a clean way to do this? I know i can use PHP widgets, but
arent they only for reusable views?

No comments:

Post a Comment