Yii 1.1: leftsidebar

dynamic sidebar slider on the left side of the browser.
5 followers

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

Total 5 comments

#14529 report it
ramamoorthy071 at 2013/08/21 03:19am
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.

#14522 report it
ramamoorthy071 at 2013/08/20 08:45am
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.

#14521 report it
FlavorFlav at 2013/08/20 07:58am
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'));
#14520 report it
ramamoorthy071 at 2013/08/20 06:40am
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.

#14518 report it
FlavorFlav at 2013/08/20 04:27am
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?

Leave a comment

Please to leave your comment.

Create extension