Widget Fancybox для Yii 1.x ¶
Widget utilize last version of fancybox at this moment (v.2.1.5) and uses for more flexible and simple use fnacybox at your pages. Also it changes defualt control images from pictures to awesome icons
Requirements ¶
Awesome font
Usage ¶
Add Awesome font to your page (if you not embed it before)
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
Copy fancybox folder to required directory, eg: protected/extensions, so use widget at any page you need like this:
$this->widget('application.extensions.fancybox.AlFancybox', [
'targetDOM' => '.answer',
'asDialog' => true,
'hideDOM' => '#comment-form',
]
);
Widget parameters ¶
- id Widget id, by default generates automatically
- targetDOM DOM elements, fancybox will apply to. Default: a.fancied
- hideDOM DOM element that should be hided if use fancybox. Default: empty
- asDialog - Open only content in fancybox (Set of fancybox parameters, removes border and control buttons, to looks as dialog window). Default: false
- helperButton Regiser assets for Button helper. Default: false
- helperThumbs Regiser assets for Thumbnails helper. Default: false
- helperMedia Regiser assets for Media helper. Default: false
- config Configuration of Fancybox. More detailed about fancybox configuration here
More detailed description how to use, looks like and configuration you can find at Project page
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.