I am coming from Cakephp and the way that I reused elements such as headers and footers was via a renderElement function which I placed in the layout. This allowed me to send variables to the header and footer for rendering (like news items, testimonials, etc.). I am trying to determine the proper way to do this in Yii. I figure it is with components, but little is explained in the documentation and the blog demo is nice and works, but it uses Zii and widgets to put components into the layout. Can someone point me to a working set of Yii files that I can examine to see how view components are inserted into layouts in the best Yii fashion?