3108 - Важно - удаление лишних разделов из sitemao.xml

parent 1f1ba1d1
......@@ -22,6 +22,7 @@ class PageController extends \common\components\BaseController
public function actionView($document)
{
$model = $this->findDocumentModel($document);
$modelContent = $model->getLang()->one();
$documentation = $model->lang->html;
......@@ -32,6 +33,7 @@ class PageController extends \common\components\BaseController
return $this->render('view', [
'documentation' => $documentation,
'model' => $model,
'modelContent' => $modelContent
]);
}
......
......@@ -171,17 +171,13 @@ class DocList extends \yii\db\ActiveRecord
$url = '#';
$urls = [];
if ($docContents) {
$url = '/' . $docContents[0]->lang->url;
$all = \yii\helpers\ArrayHelper::map($docContents[0]->langs, 'id', 'url');
foreach ($all as $itm)
$urls [] = '/' . $itm;
$url = '/' . $docContents[0]->url;
}
$curent = [
'id' => $level->id,
'text' => $level->lang->name,
'url' => $url,
'urls' => $urls,
'state' => [
'selected' => $updated->id == $level->id,
'expanded' => true,
......
......@@ -15,7 +15,7 @@ $encodedUrl = yii\helpers\Url::current([], true);
$this->registerMetaTag(['property' => 'og:type', 'content' => 'article']);
$this->registerMetaTag(['property' => 'og:title', 'content' => $model->name]);
$this->registerMetaTag(['property' => 'og:title', 'content' => $modelContent->name]);
$this->registerMetaTag(['property' => 'og:image', 'content' => 'https://task-on.com/images/taskon.png']);
$this->registerMetaTag(['property' => 'og:description', 'content' => 'Разработка высоконагруженных сервисов, интернет порталов, корпоративных порталов.']);
$this->registerMetaTag(['property' => 'og:url', 'content' => Url::current([], true)]);
......@@ -119,7 +119,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
<a href="/">Главная</a>
<span>|</span>
<a href="/<?= common\models\Settings::getValue('documentation-home-page') ?>">Документаци для разраотчиков</a>
<span>|</span> <?php echo $model->name ?><br> <br>
<span>|</span> <?php echo $modelContent->name ?><br> <br>
</div>
</div>
</div>
......@@ -136,13 +136,13 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
<!-- Post-->
<h1><?php echo $model->name ?></h1>
<h1><?php echo $modelContent->name ?></h1>
<div class="single-post-meta">
<div class="meta-link"><i class="icon-clock"></i> Обновлено: <?= $model->list->getFormatedCreatedAt() ?></div>
</div>
<?php echo str_replace(['<!-- ¿¿¿CAROUSEL_BEGIN¿¿¿ -->', '<!-- ¿¿¿CAROUSEL_END¿¿¿ -->'], ['<div class="owl-carousel owl-carousel-need-replace hidden" data-owl-carousel="{ &quot;nav&quot;: true, &quot;dots&quot;: true, &quot;loop&quot;: true }">', '</div>'], $model->html) ?>
<?php echo str_replace(['<!-- ¿¿¿CAROUSEL_BEGIN¿¿¿ -->', '<!-- ¿¿¿CAROUSEL_END¿¿¿ -->'], ['<div class="owl-carousel owl-carousel-need-replace hidden" data-owl-carousel="{ &quot;nav&quot;: true, &quot;dots&quot;: true, &quot;loop&quot;: true }">', '</div>'], $modelContent->html) ?>
<div class="single-post-footer">
<div class="column">
......@@ -150,7 +150,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
<div class="share-links">
<a
class="tooltips social-button shape-circle sb-facebook"
href="https://www.facebook.com/sharer/sharer.php?u=<?= $encodedUrl ?>&t=<?php echo $model->name ?>&text=<?php echo $model->name ?>"
href="https://www.facebook.com/sharer/sharer.php?u=<?= $encodedUrl ?>&t=<?php echo $modelContent->name ?>&text=<?php echo $modelContent->name ?>"
onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"
target="_blank"
data-toggle="tooltip"
......@@ -159,7 +159,7 @@ $this->registerMetaTag(['property' => 'og:site_name', 'content' => 'Арт Пр
><i class="socicon-facebook"></i></a>
<a
class="tooltips social-button shape-circle sb-twitter"
href="https://twitter.com/share?url=<?= $encodedUrl ?>&text=<?php echo $model->name ?>"
href="https://twitter.com/share?url=<?= $encodedUrl ?>&text=<?php echo $modelContent->name ?>"
onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"
target="_blank"
data-toggle="tooltip"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment