mbmenu

can we pass a session variable in mbmenu array??




 <?php $this->widget('application.extensions.mbmenu.MbMenu',array( 

			'items'=>array(

				array('label'=>'Home', 'url'=>array('/home')),

                array('label'=>'School', 'url'=>array('/school'),

				'items'=>array( 										 

					array('label'=>'Edit School Details'),

.........




this is my menu with dropdown list…in this i want a session variable to be pased as url

DId you try what I said ?

Should work




'items'=>array(

                array('label'=>'Home', 'url'=>array('/home',array('session_id'=>$_SESSION['id']))),


//or

'items'=>array(

                array('label'=>'Home', 'url'=>$_SESSION['url']), 



hehe hi again…

what i need to ba pase in url is like myproject/index.php/school/EditSchool/1

but i got it as

a/index.php/school/EditSchool?0[id]=1

i used your code as


array('label'=>'Edit School Details','url'=>array('/school/EditSchool',array('id'=>Yii::app()->user->schoolId))),

how is your url rules ?

should contain


'urlFormat'=>'path',

to be like you said

also


print_r(Yii::app()->user->schoolId);

and check what it contains, looks like it contains an array

Yes u r rit gustavo,it is being passed as array…what i did is i just removed the array thats it…

Now it Works…!!! :D

Glad I could help Srav

hey, its working fine with firefox browser but session id is not being passed in other browsers like chrome…what can be done?

be sure that you have cookie enabled in this browser and you have logged in …

then


print_r($_SESSION)

to see what it contains