deviceDetect->isMobile(); $maxheight = $mobile?'900':'750'; if($gallery instanceof \app\models\front\Gallery && count($gallery->getBehavior('galleryBehavior')->getImages())>0 ){ $c = Yii::$app->acache; $c->set('fotorama', true); $i=1; ob_start(); foreach($gallery->getBehavior('galleryBehavior')->getImages() as $image){ $add_cap = ($image->name != '')?", caption: '".$image->name."'":''; if( ( $model->type == 2 || $model->type == 6 ) && !$mobile ){ // лонгрид $mainimg = $image->getUrl('large'); }else{ $mainimg = $image->getUrl('medium'); } if( $mainimg ){ ?> {img: '', thumb: 'getUrl('small')?>', full:'getUrl('large')?>', id: }, */ ?>
name?>