Sidebar on the left side of the browser. slides in on mouse over and slides out automatically when mouse leaves the sidebar.
I refered rightsidebar extention from yiiframework.com.
This left sidebar can be used to display menu or some other useful things in your application.
Requirements ¶
Yii 1.1.12
Installation ¶
Copy the folder 'leftsidebar' to protected/extensions
Usage ¶
Just type below things in your view file
$this->beginWidget('application.extensions.leftsidebar.leftSidebar');
//your sidebar contents goes here
$this->endWidget();
Example ¶
$this->beginWidget('application.extensions.rightsidebar.RightSidebar', array('title' => 'Menu', 'collapsed' => true));
//here you display a cmenu or gridview or any other thing as per your needs.
//or you can simply display contents form variable like below
echo $var;
$this->endWidget();
Demo ¶
A demo sidebar available at this location. But it will be a rightsidebar.
I have not add arrow mark in my extention, If you need in your application then i will guide to achieve this.
Update ¶
I have created another extension sidebar, This can be used to display sidebar on either right or left side the browser. I prefer you to use this extension.
Further Details are at this location.
Finally ¶
I am waiting for valuable comments from users to improve this extension.
I have created an youtube video on Yii framework view it and review it at https://www.youtube.com/watch?v=G7_2tdZRQnE
Resources ¶
rightsidebar extension from yiiframework.com
improvement idea
hi,
i uploaded this rightsidebar you referred to. i only copied some code from yiiplayground project, so i never really understood how it works in detail :)
it looks like you took a closer look into the code.
so the question: maybe is it possible, to combine this 2 extensions (rightsidebar,leftsidebar) with an optione of the side? what you think?
It can be improved
hi, I can't get exactly what u ask me to do. What do you mean by 'with an optione of the side?'?
May be you want to combine both the right and left side bars!. If then i will work on it and i will update you.
correct!
yes, that was, what i meant :)
maybe with an option 'position' which can be 'left' or 'right', like this:
$this->beginWidget('application.extensions.sidebar.Sidebar', array('title' => 'Menu', 'collapsed' => true, 'position'=>'left'));
Yes we can
In that case we have to use css and js files for both sidebars. We have to include files based on 'position' entered by user. If user need to display sidebar on either then we can include css and js files of corresponding sidebar. Iam working on it now.
Thanks.
New Sidebar (Displayed on Right or Left side)
I have created another extension sidebar, This can be used to display sidebar on either right or left side the browser. You can use this extension to avoid inclusion of leftsidebar and rightsidebar extension to display sidebar on both left and right sides.
I think this will be useful.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.