public function actionRobots() { header("Content-type: text/plain"); Yii::$app->response->data = DbText::widget(['key' => 'frontend.web.robots.txt', 'domain_id' => Yii::getAlias('@domainId')]); Yii::$app->response->format = \yii\web\Response::FORMAT_RAW; return Yii::$app->response; }
<?php use common\widgets\DbText; echo DbText::widget(['key' => 'frontend.layout.footer.' . Yii::$app->language]);
<?php use yii\helpers\Url; use common\models\Page; use common\widgets\DbText; ?> <?php Page::switchToUrlLocale(); ?> <?php require_once Yii::getAlias('@webroot/js/app/templates/app.html'); ?> <?php $js = 'app.config = ' . json_encode(Yii::$app->keyStorage->getAllArray()) . ';' . 'app.config.frontend_app_debug = "' . YII_DEBUG . '";' . 'app.config.frontend_app_web_url = "' . Yii::getAlias('@web') . '";' . 'app.config.frontend_app_frontend_url = "' . Yii::getAlias('@frontendUrl') . '";' . 'app.config.frontend_app_locale = "' . Yii::$app->language . '";' . 'app.config.frontend_app_facebook_app_id = "' . getenv('FACEBOOK_APP_ID') . '";' . 'app.config.frontend_app_site_type = "' . Yii::getAlias('@siteType') . '";' . 'app.config.frontend_app_code_body_end = "' . htmlspecialchars(str_replace(array("\r\n", "\r", "\n"), "", DbText::widget(['key' => 'frontend.code.body.end']))) . '";' . 'app.config.frontend_app_api_url = "' . Yii::getAlias('@apiUrl') . '";'; $this->registerJs($js, \yii\web\View::POS_END); //yii\helpers\VarDumper::dump(common\models\Page::getMetaTags(), 11, 1); die(); foreach (Page::getMetaTags() as $tag) { $this->registerMetaTag($tag); } \frontend\assets\AppAsset::register($this); ?>
/* @var $content string */ $this->beginContent('@frontend/views/layouts/base.php'); ?> <div class="container"> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <?php if (Yii::$app->session->hasFlash('alert')) { ?> <?php echo \yii\bootstrap\Alert::widget(['body' => ArrayHelper::getValue(Yii::$app->session->getFlash('alert'), 'body'), 'options' => ArrayHelper::getValue(Yii::$app->session->getFlash('alert'), 'options')]); ?> <?php } ?> <!-- Example of your ads placing --> <?php echo \common\widgets\DbText::widget(['key' => 'ads-example']); ?> <?php echo $content; ?> </div> <?php $this->endContent();
<link rel="stylesheet" href="https://libs.cdn.renault.com/etc/designs/renault_v2/2.3.0-92/common-assets/css/pre-ie10.min.css"> <![endif]--> <link rel="icon" type="image/png" href="/favicon.ico"> <?php $this->head(); ?> <?php echo Html::csrfMetaTags(); ?> <?php echo Html::cssFile(YII_DEBUG ? '@web/css/all.css?v=' . filemtime(Yii::getAlias('@webroot/css/all.min.css')) : '@web/css/all.min.css?v=' . filemtime(Yii::getAlias('@webroot/css/all.min.css'))); ?> <?php echo Html::cssFile('@web/plugins/rs-plugin/css/settings.css?v=' . filemtime(Yii::getAlias('@webroot/plugins/rs-plugin/css/settings.css'))); echo DbText::widget(['key' => 'frontend.code.head.end', 'domain_id' => Yii::getAlias('@domainId')]); ?> </head> <body> <?php $this->beginBody(); ?> <main id="container" role="main"> <?php echo $content; ?> </main> <?php
use common\components\filesystem\FileLogic; use yii\helpers\FileHelper; use backend\modules\i18n\models\search\I18nMessageSearch; ?> <?php Page::switchToUrlLocale(); ?> <?php require_once Yii::getAlias('@webroot/templates/noscript.html'); require_once Yii::getAlias('@webroot/templates/app.html'); ?> <?php $js = 'server_config = ' . json_encode(Yii::$app->keyStorage->getAllArray()) . ';' . 'server_config.frontend_app_debug = "' . YII_DEBUG . '";' . 'server_config.frontend_app_web_url = "' . Yii::getAlias('@frontendUrl') . Yii::getAlias('@web') . '";' . 'server_config.frontend_app_frontend_url = "' . Yii::getAlias('@frontendUrl') . '";' . 'server_config.frontend_app_domain_id = "' . Yii::getAlias('@domainId') . '";' . 'server_config.frontend_app_default_domain_id = "' . Yii::getAlias('@defaultDomainId') . '";' . 'server_config.frontend_app_dealer_id = "' . Yii::getAlias('@dealerId') . '";' . 'server_config.frontend_app_locale = "' . Yii::$app->language . '";' . 'server_config.frontend_app_facebook_app_id = "' . getenv('FACEBOOK_APP_ID') . '";' . 'server_config.frontend_app_instagram_client_id = "' . getenv('INSTAGRAM_CLIENT_ID') . '";' . 'server_config.frontend_app_code_body_end = "' . htmlspecialchars(str_replace(array("\r\n", "\r", "\n"), "", DbText::widget(['key' => 'frontend.code.body.end', 'domain_id' => Yii::getAlias('@domainId')]))) . '";' . 'server_config.frontend_app_files_midified = ' . json_encode(FileLogic::getModifiedTime(FileHelper::findFiles(Yii::getAlias('@webroot/templates')))) . ';' . 'server_config.frontend_app_t = ' . json_encode(I18nMessageSearch::getForFrontend()) . ';' . 'server_config.frontend_app_api_url = "' . Yii::getAlias('@apiUrl') . '";'; $this->registerJs($js, \yii\web\View::POS_HEAD); //yii\helpers\VarDumper::dump(common\models\Page::getMetaTags(), 11, 1); die(); foreach (Page::getMetaTags() as $tag) { $this->registerMetaTag($tag); } if (empty($_SESSION['flag'])) { ?> <?php $_SESSION['flag'] = true; ?> <div id="mobile-popup" class="mobile-greeting hidden-lg hidden"> <button class="close-btn">✕</button> <p> <?php echo Yii::t('frontend', 'popupMessage');
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="fb:app_id" content="1671684663080056" /> <title><?php echo Html::encode($this->title); ?> </title> <link rel="icon" type="image/png" href="http://qreachers.com/favicon.ico"> <?php $this->head(); ?> <?php echo Html::csrfMetaTags(); ?> <?php echo DbText::widget(['key' => 'frontend.code.head.end']); ?> </head> <body> <div class="preloader animated"> <div class="preloader__wrap"> <div class="preloader__logo preloader__logo--spin animated"></div> </div> <div class="preloader__status animated"></div> </div> <?php $this->beginBody(); ?>