I'm building my first module in Yii (yet another CMS module) to learn more about Yii and its capabilities. The next step is I'd like to add a "DEV bar" to the top of all of my pages. In my layout I added the following:
<?php echo Yii::app()->getModule('cms')->toolbar(); ?>
In my CmsModule file, I added a function named toolbar() and I'm not sure where to go from here. Basically, I want to send my Page model to the CMS toolbar, then render the CMS toolbar view. My toolbar should have links to edit the current page meta and page content. In order to following best practices in Yii & MVC, how would this best be achieved? In CmsModule, would I get the PageModel and if so, how would I render a CMS view? I've tried using $this->render(), but I get errors:
Using $this when not in object context
Yii::app()->controller->render()