Yii Framework Forum: YII Theme for Dummies - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

YII Theme for Dummies Creating a basic YII theme Rate Topic: -----

#1 User is offline   Farlow 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 26-June 10

Posted 02 July 2010 - 08:46 PM

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

etc

Thanks a bunch.

Farlow
0

#2 User is offline   eval 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 85
  • Joined: 25-November 08
  • Location:Athens - Greece

Posted 02 July 2010 - 08:57 PM

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

HTH
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users