I needed to render my sidebar content dynamically (i.e. it changed from view to view), but I didn’t want to repeat markup which belongs in the layout, in case I need to change the layout (e.g. move the sidebar from right to left or add some fancy background which requires more div tags to be added). I also didn’t want to have lots of if statements in my column2 layout file. So what I’ve done is used CClipWidget to capture the sidebar content rendered as part of the view and then render it in the sidebar.
I’ve created a wiki page on how to do this (and other options to achieve the same outcome).
http://www.yiiframework.com/wiki/127/dynamic-sidebar-using-cclipwidget/