= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'title',
'ptitle',
[
'attribute' => 'cover',
'format' => 'raw',
'value' => function ($model){
$images = [ // images at popup window of prettyPhoto galary
1 => [
'src' => $model->cover,
'title' => '',
],
];
return $model->cover ? LightBoxWidget::widget([
'id' =>'lightbox', // id of plugin should be unique at page
'class' =>'galary', // class of plugin to define style
'height' =>'100px', // height of image visible in widget
'width' =>'100px', // width of image visible in widget
'images' => $images,
]) : null;
}
],
'created_at:datetime',
'updated_at:datetime',
'slug',
'sort'
],
]) ?>