Hi, is there a tutorial or something similar on how to create a complex layout with Yii?
For complex layout I mean a page divided (for example) in header, sidebar, content and footer sections.
And a subdivision for each one of them: “header” with topHeader and logoHeader, “sidebar” and “content” with blocks dinamically populated… what’s best strategy to create a layout like that?
In views/layout/main.php there is a $content var that renders output. How to create a $header or $sidebar ones?
At this time you cannot push data to the layout. However, you can use the pull method in which you define public properties in your controller, and read it in your layout ($this always refers to the current controller in view files).
i don’t understand… maybe with an example it can be easier.
if I want to create block1 with latest 5 news and block2 with a list of friend sites in the "sidebar" DIV of my layout… is it possible to do that with Yii?
is it possible to make them “indipendent” from main controller? (I ì’ve understood that it is not possible)