Commit d6b0440163109f47d3877237a3a8a3531b6677a7

Authored by alex
1 parent ec0ad167

Поменял логику работы виджета Parthenr 1

Showing 1 changed file with 6 additions and 4 deletions   Show diff stats
frontend/widgets/views/_parthnerList.php
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 */ 4 */
5 5
6 use artbox\core\components\imagemanager\models\ImageManager; 6 use artbox\core\components\imagemanager\models\ImageManager;
7 - 7 +use yii\helpers\Url;
8 8
9 9
10 ?> 10 ?>
@@ -13,14 +13,16 @@ use artbox\core\components\imagemanager\models\ImageManager; @@ -13,14 +13,16 @@ use artbox\core\components\imagemanager\models\ImageManager;
13 <?php ?> 13 <?php ?>
14 <?php foreach ($data as $parthner):?> 14 <?php foreach ($data as $parthner):?>
15 <?php 15 <?php
16 - $filePath=(file_exists('../../web/img/'.$parthner->image->fileName))  
17 - ?'/img/'.$parthner->image->fileName:'/img/no-image.png'; 16 +
  17 + $filePath=(file_exists(Url::to("@web/img/".$parthner->image->fileName)))
  18 + ?Url::to("@web/img/".$parthner->image->fileName):
  19 + Url::to("@web/img/no-image.png");
18 ?> 20 ?>
19 21
20 22
21 23
22 <li class="item"> 24 <li class="item">
23 - <a target="_blank" href="<?=$parthner->link;?>"><img src="<?=$filePath;?>" alt="" class="img-responsive"></a> 25 + <a target="_blank" href="<?=$parthner->link;?>"><img src="<?=Url::to("@web/img/".$parthner->image->fileName,true)?>" alt="" class="img-responsive"></a>
24 </li> 26 </li>
25 <?php endforeach;?> 27 <?php endforeach;?>
26 </ul> 28 </ul>
27 \ No newline at end of file 29 \ No newline at end of file