This repository is work in progress. The Frame widget can already be used.
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require --prefer-dist simialbi/yii2-widget-turbo
or add
"simialbi/yii2-widget-turbo": "^1.0.0"
to the require
section of your composer.json
.
<?php
Frame::begin([
'options' => [
'id' => 'example-frame'
]
]);
?>
<a href="/messages/expanded">
Show all expanded messages in this frame.
</a>
<form action="/messages">
Show response from this form within this frame.
</form>
<?php
Frame::end();
<?php
Frame::begin([
'options' => [
'id' => 'example-frame',
'src' => Url::to(['/messages'])
]
]);
?>
Content will be replaced when /messages has been loaded.
<?php
Frame::end();
<?php
Frame::begin([
'options' => [
'id' => 'example-frame',
'src' => Url::to(['/messages'])
],
'lazyLoading' => true
]);
?>
Content will be replaced when the frame becomes visible and /messages has been loaded.
<?php
Frame::end();
yii2-widget-turbo is released under MIT license. See bundled LICENSE for details.