sidebar on the right side of the browser. slides in on mouse over and slides out automatically when mouse leaves the sidebar.
i stole all the code from the RightMenu in the Yii Playground. so all credits go to the developers of the Yii Playground project.
only thing i have done is wrapping this code into a Yii Extension for generic use.
Requirements ¶
Developed with Yii 1.1.12
Installation ¶
Copy the folder 'rightsidebar' to protected/extensions
Usage ¶
$this->beginWidget('application.extensions.rightsidebar.RightSidebar');
//put your sidebar content here
$this->endWidget();
Parameters ¶
- title : @var String title of the sidebar widget , default = 'RightSidebar'
- collapsed : @var boolean widget starts collapsed or expanded, default = false
Example ¶
$this->beginWidget('application.extensions.rightsidebar.RightSidebar', array('title' => 'Menu', 'collapsed' => true));
$this->widget('zii.widgets.CMenu', array(
'items' => array(
array('label' => 'Home', 'url' => array('site/index')),
array('label' => 'Products', 'url' => array('product/index'), 'items' => array(
array('label' => 'New Arrivals', 'url' => array('product/new')),
array('label' => 'Most Popular', 'url' => array('product/popular')),
)),
),
));
$this->endWidget();
Resources ¶
this is not really a demo of this extension, but i stole all the code so it looks and works exactly like RightMenu on the yii playground page.
User Contributed Notes 3
it 's good , but can be impoved
for now it just fixed to the right side of page , it will be better to have a element floated to any side (top, bottom , left , right) just like this jquery plugin : jquery.sidebar on github and the demo
it will be better have the configuable "stiky" capability :)
thanks
nice extension .
New Sidebar (Displayed on Right or Left side)
I have created a extension sidebar, This can be used to display sidebar on either right or left side the browser. You can get more info from here.
Thanks to FlavorFlav.
Leave a comment
If you have any questions, please ask in the forum instead.
Join the conversation to share a note.