I've just gotten past a bit of the learning curve with clips, so I thought I'd share my current solution.
Basically, I wanted a re-useable CMenu sidebar widget for various departments of my site.
My controller looks like this (I'm using actions too):
class ExampleController extends Controller
public function actions()
'stories' => array(
'class' => 'application.controllers.example.StoriesAction',
Then, my StoriesAction (controllers/example/StoriesAction.php) looks like this.
class StoriesAction extends CAction
public function run()
$this->controller->layout = 'sidebarleft';
Then, in views/example/_sidebar.php:
'itemCssClass' => 'item',
The sidebarleft layout contains, among other things:
<?php echo $this->clips['sidebar']; ?>
<?php echo $content; ?>
This way, each controller can have its own sidebar, written as a single script, which is rendered into a clip and used in a global layout. Niiice.