Hi,
Can i know how to make dropdown option on Logout button in application.
In my views/layouts/main.php is having like this…
array(‘label’=>‘Logout (’.Yii::app()->user->name.’)’, ‘url’=>array(’/site/logout’), ‘visible’=>!Yii::app()->user->isGuest),
Pls help me how to make dropdown on my logout button. If i click logout button it need to show settings, etc…
perochak
(Amjad Mughal)
2
Add a new array as
array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest,
'items'=>array(
// dropdown menu items
)
),
You also need to setup css settings to show and hide on click or mouse over.
Thank you, it’s working. Can i know how to set in css.
perochak
(Amjad Mughal)
4
You should search for some Dropdown style for CSS
in css you can use
#menu-top ul { list-style: none; margin: 0; padding: 0; position: relative; height: 30px; }
#menu-top ul li { display: block; height: 28px; float: left; overflow: visible; }
#menu-top ul li:hover > ul { display: block; }
#menu-top ul li a { float: left; display: block; }
#menu-top ul li ul { display: none; position: absolute; top: 100%;
background: #000; color: #fff; height: auto;
}
#menu-top ul li ul li a { color: #ccc; padding: 4px 14px; display: block; }
#menu-top ul li ul li.active a,
#menu-top ul li ul li a:hover { color: #fff; }