Skip to content

cybercog/yii2-widgets-4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Yii2 Widgets

This repository contains my widgets for the Yii2 Framework.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist golles/yii2-widgets "*"

or add

"golles/yii2-widgets": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code:

IframeAutoHeight

This widget generates an iframe object in the dom that adjusts it's height automatically based on the height of the iframes content. The result is that it looks like the iframe content is normal page content, it won't look like there is an iframe at all.

Note, this only works on iframes on the same domain.

echo IframeAutoHeight::widget([
    'intervalTime' => 500,
    'noIframeSupportText' => 'Your browser does not support iframes.',
    'iframeOptions' => [
        'id' => 'webalizerIframe',
        'src' => 'http://mydomain.com/iframe.html',
        'width' => '100%',
        'height' => '500px',
        'frameborder' => '0',
        'scrolling' => 'no'
                       
     ]
]);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • PHP 100.0%