Commit d6b0440163109f47d3877237a3a8a3531b6677a7
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 | 4 | */ |
5 | 5 | |
6 | 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 | 13 | <?php ?> |
14 | 14 | <?php foreach ($data as $parthner):?> |
15 | 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 | 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 | 26 | </li> |
25 | 27 | <?php endforeach;?> |
26 | 28 | </ul> |
27 | 29 | \ No newline at end of file | ... | ... |