コード例 #1
0
ファイル: view.php プロジェクト: kansey/yii2albom
?>


<div class="site-contact">
 <div>
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
</div>
  
<?php 
$img = $model->getImages();
$ids = ArrayHelper::getColumn($img, 'url');
$items = [];
?>

<?php 
foreach ($ids as $image) {
    $item = ['url' => $image, 'src' => $image, 'options' => array('title' => 'Image')];
    array_push($items, $item);
}
?>

<?php 
echo dosamigos\gallery\Carousel::widget(['items' => $items]);
?>
</div>
コード例 #2
0
ファイル: about.php プロジェクト: hdushku/npai
use yii\helpers\Html;
/* @var $this yii\web\View */
$this->title = 'About';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-about">
    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>This is the About page. You may modify the following file to customize its content:</p>

    <code><?php 
echo __FILE__;
?>
</code>
</div>

<?php 
use frontend\components\HelloWidget;
echo HelloWidget::widget(['message' => 'Good morning here']);
?>


<?php 
$items = [['title' => 'Sintel', 'href' => 'http://media.w3.org/2010/05/sintel/trailer.mp4', 'type' => 'video/mp4', 'poster' => 'http://media.w3.org/2010/05/sintel/poster.png']];
echo dosamigos\gallery\Carousel::widget(['items' => $items, 'json' => true, 'clientEvents' => ['onslide' => 'function(index, slide) {
            console.log(slide);
        }']]);