Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Yii framework extension to support Galleria JavaScript image gallery.
JavaScript PHP
branch: master

update doc

latest commit 9f78011202 authored
Failed to load latest commit information.
js version 0.1
theme/classic version 0.1
views version 0.2 beta
EGalleria.php update doc
EGalleriaBehavior.php version 0.2 beta
README update doc
galleria.options.php version 0.2


Version: 0.2
Author: Dimitrios Meggidis <tydeas.dr (at)>


Yii extension to support the [Galleria]( Javascript image gallery.
The galleria files that are included are from commit: 373a3a77e83eef919046.


Extract the zip file under the extension folder and should look like.

or use the and clone the repository under the extension folder.
    git clone


Add import of EGalleria extension in your config/main.php file:



You can use the widget in 2 diff ways. You can attach a dataProvider and the images will 
be rendered from that provider or you can create the dom structure need for the galleria 
plugin your own.

####With Dataprovider

To bind a dataprovider with the widget you need to specify at least which of the model attributes 
is the url for the image.

This can be achieved in 2 ways:
- By passing "binding" attribute at the initialization of widget.
- Or adding EGalleriaBehavior in your model behaviors() function.

"Behavior" feature is usefull when you want to use same model for more than 1 EGalleria widget
so you don't have to define binding again and again.

#####Behavior definition

In your model behaviors() function add:

    public function behaviors()
            'image'=>'image_field_name', //This is a required binding and will be the src of image element
            'description'=>'image_description', //Optional
            'title'=>'image_title', //Optional
            'link'=>'image_link', //NOT SUPPORTED IN CURRENT VERSION
            'author'=>'image's_author' //NOT SUPPORTED IN CURRENT VERSION

#####Binding in initialization of widget

Check later in example. The available attributes are the same with the behavior above.


In your view file add.

1. Use of dataprovider with behavior defined in model.

$data = new CActiveDataProvider();
$this->widget('EGalleria', array(

2. Define binding in init with no model behavior

$data = new CActiveDataProvider();
$this->widget('EGalleria', array(

####Without a Dataprovider

You can use EGalleria widget without dataprovider like:

<img src"/testo.png" alt="Description of image" title="Title of image" />
<img src"/test1.png" />
<img src"/test2.png" />
<img src"/test3.png" />
For more information on basic dom structure, [check.](

###More options

There are more options that can be applied to the widget at definition.
- "galleria"=>array(..) An associative array with all the [options of the galleria plugin.](
- "srcPrefix"=>"protected/data/..", If this property is defined then it will be preappened in each image src url. $src = $srcPrefix.$image;


I have not tested all the galleria options, so i need some help on this by you :). Callback,themes and api features of galleria are not yet 
implemented, will be under request.
Any suggestions or contributions are welcome, but please use the repository of for such thinks.
Please report bugs or leave comments.


[Galleria repository](
[Galleria official site](http://www.

####Version 0.1
- Register all scripts
Something went wrong with that request. Please try again.