title = $model->name; $this->params['breadcrumbs'] = [ ]; $this->params['breadcrumbs'][] = [ "text"=>"Фото репортажи", "url"=>"/photo" ]; $imgFileShort = "/images/report_photo/{$model->folder}/"; $info = $model->title; $txt_date = date( "[Y-m-d] ", strtotime( $model->date ) ); Yii::$app->og->title = $model->title; Yii::$app->og->description = $txt_date.trim(str_replace( '"',"'",substr(strip_tags( $model->body ),0,150)))."..."; Yii::$app->og->og_url = $model->getUrl(true);Yii::$app->og->canonical = $model->getUrl(true); Yii::$app->og->og_type = "website"; Yii::$app->og->dtpub = date( "r", strtotime( $model->date ) ); $imgFileShort = "/images/report_photo/{$model->folder}/"; $amic_image = $imgFileShort."0.size2.jpg"; if( file_exists(Yii::getAlias('@webroot').$amic_image) ){ Yii::$app->og->og_image = $amic_image; } ?>
render("/layouts/breadcrumbs")?>

title?>

getReport(); foreach( $report as $item ){ if( !$item->active ) continue; $imgFile = $imgFileShort."".$item->id.".320.jpg"; if( file_exists(Yii::getAlias('@webroot').$imgFile ) ){ $imf = $imgFileShort.$item->id.".800.jpg"; $r = @getimagesize(Yii::getAlias('@webroot').$imgFileShort.$item->id.".1024.jpg" ); $imgphoto = ( $r === false )?$imf:$imgFileShort.$item->id.".1024.jpg"; ?> <?=($model->title !='')?htmlspecialchars($model->title):htmlspecialchars($info)?>

body?>