Yii 1.1: dashboard-controller

Extended controller with Dashboard

jQueryUI based Dashboard controller.

You can:

  • drag/drop portlets
  • store user preference in your own table
  • set autosave portlets position on/off
  • write page's content before and after dashboard
  • apply any of jQuery UI theme
  • set dashboard columns count
  • show/hide dashboard header
  • show/hide dashboard


Yii 1.1.5 or above


Extend your controller from this dashboard base controller

class DashController extends UIDashboardController

and have fun.

Sample controller is present.


Donate to next release:

  • add feature to store portlet's state

Change log:

ver 1.1

(March 10, 2011)

  • Added polish translation

(March 4, 2011)

  • fixed autosave bug
  • fixed double ajax call during autosaving
  • rewrite store preference code. Now the record is not completely removed but only updates the "preference" field.

(Thanks Tobias B. for the help)

ver 1.0

  • initial release


See other extensions:

Total 14 comments

#13271 report it
ruderbytes at 2013/05/20 01:24am
yii cool dashboard

Wow So Cool

This is make beautiful dashboard

#12379 report it
Nur Rochim at 2013/03/17 10:24am

Hi... Support yii 1.13?

#10340 report it
skworden at 2012/10/21 04:46am
How to install

To install you do the following:

This is an additional controller not a extension or module so you don't have to do much to get it to work.

I just used xNicox db table:

create this table in your database

CREATE TABLE `dashboard_page` (
  `user_id` int(11) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)

Download and extract the files to their locations under your protected file.

i.e. in the download controllers file, put all of its contents in your protected/controllers file. You will do the same for the view and components files.

Go to yourdomainname/dashboard and you can see it. Use the peoples mods in this post to make your other portlets work.

#8656 report it
FlyBot at 2012/06/17 11:59am
How to set up

Please, extract all from archive under protected folder and use DashController or just extend your own controller from UIDashboardController. The Controllers init function must set up params for table (table name, user ID field name, user preference field name). Sample: $this->setTableParams('dashboard_table', 'user_id', 'prefference'); Then, set array of portlets (see sample in DashController). You may use $this->setAutosave(true) for saving user's prefference;

#8298 report it
eegnom1807 at 2012/05/23 02:54pm
Render any component inside portlet

Modify the code to render any component in the protlet


        array('id'=>1, 'title'=>'Logs', 'renderContent'=>true, 'view'=>'application.views.info.logs', 'info'=>array('dataProvider'=>$this->logs()), 'flag'=>false)
public function logs()
        $dataProvider = new CActiveDataProvider('Logs');
        return $dataProvider;

View showDash:

<div class="dash-portlet-content">
        if ($row['renderContent']) {
            $this->renderPartial($row['view'], array('dataProvider'=>$dataProvider), $row['flag']);
         } else {
             echo $row['content'];
#7846 report it
jiaming at 2012/04/22 04:44pm
waiting for update...

Thanks so much for your ext.... Would you please write some database tutorial...

or.....any tutorial would be great.

Thanks so much.

#6412 report it
rei at 2012/01/08 09:55pm
Re: How to render CGridView Inside portlet?

I can't find a way to solve this problem without modifying the script a little.

In showDash.php:

<div class="dash-portlet-content">
  if ($row['renderPage']) 
    echo $row['content'];

To set the portlet:

      'content'=>'/flight/dashboard' (path of view to be rendered)
    array('id'=>2, 'title'=>'Maintenance', 'content'=>'Maintenance Summary'),

If you use ajax update in your CGridView (like sorting/searching), you may need to use something like livequery plugin so that everything will work properly after ajax refresh. In dashboard.js I add something like:

$('#dash-column td').livequery(function() {
   $( "#dash-column td").sortable({
      opacity: 0.8,
      connectWith: "#dash-column td"

Hope this can help someone else in the future. Thanks for the great extension, anyway!

#6370 report it
rei at 2012/01/04 01:35am
How to render CGridView Inside portlet?

Is it possible to render CGridView inside the portlet? I tried something like this:


but keep getting this error:

Fatal error: Call to a member function getId() on a non-object in /.../yii/framework/web/CController.php on line 963
#5849 report it
FlyBot at 2011/11/20 01:51pm

Portlet is array('id', 'title', 'content'). Example in controllers/DashController.php file. Portlets use jQuery UI theme from assets/themes. I just dont know how to use the dashboard_page table also :-)

#5835 report it
Peter JK at 2011/11/17 10:49pm
i just dont know how to use the dashboard_page table

Hai FlyBot

I just dont know how to use the dashboard_page table.. and how it customize the portlet..

#5466 report it
xNicox at 2011/10/14 08:47am
Create Database:

Hey guys I create this database:

CREATE TABLE `<prefix>dashboard_page` (
  `user_id` int(11) DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)

If your "prefix" is not blanks, yo should change: "app_roo_dir"/protected/controllers/DashController.php

$this->setTableParams('<prefix>dashboard_page', 'user_id', 'title');

Best regards

#3413 report it
FlyBot at 2011/04/11 12:16pm
How to use

Simple unzip this archive under protected folder and look http://localhost/dash in your browser.

#3210 report it
kyle z at 2011/03/25 10:43am

I know this may seem self explanatory, but Install instructions here or in the zip file would help us simple folk.

#2967 report it
stutteringp0et at 2011/03/03 04:52pm

I have 2 projects that might use an extension like this. I'm looking forward to running some tests.

Leave a comment

Please to leave your comment.

Create extension