Yii Framework Forum: Cportlet And Cmenu - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cportlet And Cmenu Rate Topic: -----

#1 User is offline   bardoo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 17
  • Joined: 30-January 13

Posted 07 February 2013 - 03:48 AM

hi,
i want to know where CMenu (in the layout) gets the items in this code?
$this->beginWidget('zii.widgets.CPortlet', array(
						'title'=>'Operations',
						));
					$this->widget('zii.widgets.CMenu', array(
						'items'=>$this->menu,
						'htmlOptions'=>array('class'=>'operations'),
						));
					$this->endWidget();

thnx
HOPE IS A GOOD THING, MAYBE THE BEST THINGS, AND NO GOOD THING EVER DIES.
0

#2 User is offline   luk1999 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 35
  • Joined: 20-April 11
  • Location:Poland

Posted 08 February 2013 - 06:11 AM

By default this parameter is defined in file: protected/components/Controller.php.
/**
* @var array context menu items. This property will be assigned to {@link CMenu::items}.
*/
public $menu=array();

By default all controllers located in protected/controllers/ extends this class. You can change this array values inside controller action or in view file.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users