示例#1
0
<?php

/**
 * @var \common\components\View $this
 * @var \app\modules\main\models\Pages $model модель текстовой страницы
 */
echo $model->text;
echo \app\modules\main\widgets\gallery\Gallery::widget(["files" => $model->getFiles('image')]);
if ($model->comments) {
    echo '<h3>' . Yii::t('main/app', 'Comments') . '</h3>';
    echo \app\modules\main\widgets\comments\Comments::widget(["modelClass" => get_class($model), "itemId" => $model->id]);
}
示例#2
0
<?php 
if ($file) {
    ?>
    <a rel="news-item" class="photogallery" href="<?php 
    echo $file->getRelPath();
    ?>
">
        <img style="margin: 0 10px 5px 0" src="<?php 
    echo Yii::$app->resizer->resize($file->getPath(), $detailImageWidth);
    ?>
"
             alt="" align="left" class="img-thumbnail"/>
    </a>
<?php 
}
?>
    <p class="price"><?php 
echo Yii::$app->formatter->asCurrency($model->price);
?>
</p>
<?php 
echo $model->text;
echo \app\modules\shop\widgets\ToBasket::widget(["model" => $model]);
echo \app\modules\main\widgets\gallery\Gallery::widget(["files" => $model->getFiles('image'), "skipFromStart" => 1, "rel" => "news-item"]);
?>

<?php 
if ($model->comments) {
    echo '<h3>' . Yii::t('main/app', 'Comments') . '</h3>';
    echo \app\modules\main\widgets\comments\Comments::widget(["modelClass" => get_class($model), "itemId" => $model->id]);
}