Commit 5ef6db64a9101c73905950c45d00b63dc9e2b205

Authored by alex
1 parent 545a411b

Логотип в шаблоне не должен ссылатся сам на себя, если мы сейчас находимся на главной

Showing 1 changed file with 10 additions and 1 deletions   Show diff stats
frontend/views/layouts/main.php
... ... @@ -26,6 +26,7 @@
26 26 use yii\db\ActiveQuery;
27 27 use yii\helpers\Html;
28 28 use yii\web\View;
  29 + use yii\helpers\Url as DefaultUrl;
29 30  
30 31 AppAsset::register($this);
31 32 SliderAsset::register($this);
... ... @@ -100,7 +101,14 @@
100 101 <div class="container">
101 102 <div class="row">
102 103 <div class="col-xs-7 col-sm-3 col-md-2 col-lg-2 logo-wrapp">
103   - <a href="<?php echo \frontend\helpers\Url::home(); ?>">
  104 +
  105 + <a
  106 + <?php if(DefaultUrl::current()!=='/site/index'): ?>
  107 + href= "<?php echo \frontend\helpers\Url::home(); ?>">
  108 + <?php else: ?>
  109 + >
  110 + <?php endif;?>
  111 +
104 112 <?php
105 113 if ($settings->logo != null){
106 114 echo '<img src="/storage/logo/'.$settings->logo.'" alt="">';
... ... @@ -115,6 +123,7 @@
115 123 }
116 124  
117 125 ?>
  126 +
118 127  
119 128 </a>
120 129 </div>
... ...