I am working with the Blog demo. Basically, I’d like the entire demo to be a page in an existing website. The main problem I’m running into is displaying the Widgets on all the pages, much like the demo does. I don’t want to include these widgets in the layout of my website but just on the pages with the blog functionality. This would be similar to using nested master pages in ASP.NET which is what I’m most familiar with. I could change all the views for the Post scripts to get this effect but I’m wondering if there is a better way to accomplish this. Any ideas would be appreciated.
Thanks for the reply. I had been looking at this but I’m not familiar enough with the framework to know how to use this. Do you know of an example or can give me some direction. I created a file I called layout.php and placed it in the view/post folder where all the other views for the blogs are. Inside the file I put the echo $content line I found in the application’s main layout file. So, I’m hoping that the views will first be included into MY layout then that would be included into the MAIN layout. If this is the case what is the code to set the layout property of my controller. I tried putting the following line at the top of the PostController class but this doesn’t work.
$this->layout = ‘layout.php’;
I may be going about this all wrong. Thanks again for your help.
Thanks for the suggestions. The first link is what I used and it was pretty simple to implement. Glad to see the support from other users with this framework. The more I learn about yii the more I like.