prettyphoto Encapsulates the prettyPhoto jQuery lightbox clone

  1. Requirements
  2. Inheritance
  3. Properties
  4. Installation
  5. Usage
  6. Resources

PrettyPhoto encapsulates the prettyPhoto jQuery lightbox clone.

prettyPhoto is a full blown media lightbox that supports images, videos, flash, YouTube, iframes and ajax, or any other content through its _custommarkup option (see the custom content tutorial for details)


Tested with Yii 1.1.8, but should work with any version


PrettyPhoto » CWidget » CBaseController » CComponent


Defined by PrettyPhoto
  • assetsUrl string URL to PrettyPhoto assets. If empty the assets under the widget's directory will be published.
  • cssFile string Name of the CSS file to be published. This must be in the css directory under the assets URL. Defaults to 'prettyPhoto.css'
  • htmlOptions array HTML options for the enclosing tag.
  • gallery boolean Whether prettyPhoto is in gallery (many items) or single item mode. Defaults to true (gallery mode)
  • options array Additional options for prettyPhoto. Defaults to array()
  • scriptFile string Name of the javaScript file to be published. This must be under the assets URL. Defaults to 'jquery.prettyPhoto.js'
  • tag string The enclosing tag. Defaults to 'div'
  • theme string The prettyPhoto theme to use. Built-in prettyPhoto themes are: _'darkrounded', _'darksquare', 'facebook', _'lightrounded', and _'lightsquare'. Defaults to 'facebook'

See the CWidget documentation for inherited properties.


Extract the files in the download to the application directory of your choice.


To use the widget put the following code in a view:

$this->beginWidget('', array
  // prettyPhoto options

echo Content links here;


Content links do not require the rel="prettyPhoto" attribute; this is added by the widget.

By configuring the options property, you may specify the options that need to be passed to prettyPhoto. Please refer to the prettyPhoto documentation for possible options (name=>value pairs).



prettyPhoto Documentation

17 0
2 451 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Yeti
Created on: Aug 23, 2011
Last updated: 10 years ago


show all

Related Extensions