Skip to content

Instantly share code, notes, and snippets.

@schmunk42
Created May 24, 2013 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmunk42/5642920 to your computer and use it in GitHub Desktop.
Save schmunk42/5642920 to your computer and use it in GitHub Desktop.
Custom Sidebar Menu with p3pages and yii-bootstrap
class SidebarMenu extends TbMenu {
public $rootNameId;
public $type = 'tabs';
public $stacked = 'true';
function init(){
parent::init();
$model = P3Page::model()->findByAttributes(array('nameId'=>$this->rootNameId));
$this->items = P3Page::getMenuItems($model);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment