Commit 8be60c43c088bf871210ed8bceeb6cd7aef15836

Authored by Alex Savenko
2 parents 9074b8e0 ecceffbf

Merge branch 'clinica_khonko' of gitlab.artweb.com.ua:steska/clinica into clinica_khonko

Showing 1 changed file with 9 additions and 5 deletions   Show diff stats
frontend/views/service/view.php
... ... @@ -9,7 +9,10 @@
9 9 */
10 10 use artbox\core\helpers\Url;
11 11 use common\models\Service;
12   -
  12 + use artbox\core\models\Alias;
  13 + use artbox\core\models\Language;
  14 +
  15 +
13 16 $seo = \Yii::$app->get('seo');
14 17 $this->params['entity'] = Service::className();
15 18 $this->params['entity_id'] = $model->id;
... ... @@ -43,9 +46,9 @@
43 46 'url' => Url::to(['alias' => $model->parent->language->alias]),
44 47 ];
45 48 }
46   -
47   -
48   -
  49 +
  50 +
  51 + $aliases = Alias::find()->where(['route' => '{"0":"site/questions"}'])->indexBy('route')->andWhere(['language_id' => Language::getCurrent()->id])->asArray()->all();
49 52 $this->params[ 'breadcrumbs' ][] = (!empty($seo->h1)) ? $seo->h1 :$model->title;
50 53 ?>
51 54 <section class="section-service-page">
... ... @@ -142,7 +145,8 @@
142 145 </div>
143 146 <?php } ?>
144 147 <div class="style service-links-c-a service-links-a">
145   - <a href="<?=Url::to(['site/questions'])?>"><?=\Yii::t('app','All questions');?></a></div>
  148 + <a href="<?=(isset($aliases['{"0":"site/questions"}'])) ?
  149 + Url::to(['alias' => $aliases['{"0":"site/questions"}']]) : Url::to(['site/questions'])?>"><?=\Yii::t('app','All questions');?></a></div>
146 150 <div class="style service-c-a-btns">
147 151 <span class="btn_"><?=\Yii::t('app','Asc question');?></span>
148 152 </div>
... ...