Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /yii2images/images/image-by-item-and-alias?item=Product1&dirtyAlias=b6e73413ff-1_50x50.jpg
- <?php $imageOne = $model->getImage(); ?>
- <?= DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- 'id',
- 'title',
- 'alias',
- 'price',
- [
- 'attribute' => 'imageOne',
- 'value' => '<img src="' . $imageOne->getUrl('50x50') . '">',
- 'format' => 'raw',
- ],
- 'status',
- 'frontpage',
- 'primary_category',
- 'sku',
- 'short_desc:ntext',
- 'full_desc:html',
- ],
- ]) ?>
- 'urlManager' => [
- 'enablePrettyUrl' => true,
- 'showScriptName' => false,
- 'enableStrictParsing' => false,
- 'rules' => [
- 'category/<alias>/page-<page:d+>' => 'category/view',
- 'category/<alias>' => 'category/view',
- 'product/<id:d+>' => 'product/view',
- 'page/<alias>' => 'page/view',
- 'search' => 'category/search',
- ],
- ],
- 'as access' => [
- ...
- 'yii2images/*',
- ],
- 'image' => 'yii2images/images/image-by-item-and-alias',
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement