YII Theme for Dummies

Hi Guys,

I moved from CodeIgniter to YII and in CodeIgniter I could simply create a header, footer and content view. Then load them with load->view() etc. Content was derived from additional view or partials.

Can someone give me a basic tutorial other than whats in the documentation on how to simply do this with Yii. I purchased some templates online and want to use the for my YII application but I don’t get clearly how this is done with YII. I understand MVC but its not clear for a dummy like me with YII :)

So give me the basics please.

Step 1. Create header - place it in folder A

Step 2. Create view, place it in folder B


Thanks a bunch.


Look for example in a newly created application under protected/views/layouts/main.php

It contains a line:

<?php echo $content; ?>

code above this line can be considered as header and below as footer.

The quoted line contains your rendered view.

Btw, i i suggest you to read the documentation as it covers this topic in detail