public function actionPartnership() { $enterprise_data = Enterprise::About(); Yii::$app->opengraph->title = Seo::Settings()->title; Yii::$app->opengraph->description = Seo::Settings()->description; Yii::$app->opengraph->image = 'http://xn--90agaunhfc3b5f.xn--p1ai/images/regularSprites/logoIQ174.png'; Yii::$app->opengraph->twitter->card = 'summary'; Yii::$app->opengraph->twitter->site = '@Webtest74'; Yii::$app->opengraph->twitter->creator = '@Webtest74'; return $this->render('about', ['enterprise' => $enterprise_data]); }
public function actionIndex() { Yii::$app->opengraph->title = Seo::Settings()->title; Yii::$app->opengraph->description = Seo::Settings()->description; Yii::$app->opengraph->image = 'http://xn--90agaunhfc3b5f.xn--p1ai/images/regularSprites/logoIQ174.png'; Yii::$app->opengraph->twitter->card = 'summary'; Yii::$app->opengraph->twitter->site = '@Webtest74'; Yii::$app->opengraph->twitter->creator = '@Webtest74'; $ids = []; foreach (Part::find()->where('file_foto != ""')->all() as $part) { $ids[$part->id] = null; } $parts = Part::find()->where(['in', 'id', array_rand($ids, 12)])->all(); return $this->render('index', ['parts' => $parts]); }
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#" lang="ru-RU"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#" lang="ru-RU"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#" lang="ru-RU"> <!--<![endif]--> <head> <meta charset="<?php echo Yii::$app->charset; ?> "/> <title><?php echo Seo::Settings()->title; ?> </title> <?php echo Html::csrfMetaTags(); ?> <!-- Open graph mark up --> <meta property="place:location:latitude" content="<?php echo Enterprise::About()->MapY; ?> "/> <meta property="place:location:longitude" content="<?php echo Enterprise::About()->MapX; ?> "/> <meta property="business:contact_data:street_address" content="<?php