Commit 7f2c9cea7992247093825e73b0cff15ab1f4a13c
1 parent
54a26acc
Изменил вывод через ImageHelper
Showing
1 changed file
with
18 additions
and
4 deletions
Show diff stats
frontend/views/site/doctor.php
... | ... | @@ -61,7 +61,21 @@ use artbox\core\helpers\ImageHelper; |
61 | 61 | $docSurname = ($docFio[1]) ?? ''; |
62 | 62 | $docPosition = $doc->language->position; |
63 | 63 | $docDescription = $doc->language->description; |
64 | - $docImg1 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; | |
64 | + $img1 = ''; | |
65 | + $img2 = ''; | |
66 | + if (isset($doc->image)) { | |
67 | + $img1 = ImageHelper::set(($doc->image) ? $doc->image->getPath() : null) | |
68 | + ->cropResize(340, 440) | |
69 | + ->quality(84) | |
70 | + ->renderImage(); | |
71 | + $img2 = ImageHelper::set(($doc->image) ? $doc->image->getPath() : null) | |
72 | + ->cropResize(165, 165) | |
73 | + ->quality(84) | |
74 | + ->renderImage(); | |
75 | + | |
76 | + } | |
77 | + #die(var_dump(htmlspecialchars($img1))); | |
78 | + # $docImg1 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; | |
65 | 79 | $docImg2 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; |
66 | 80 | $docImg3 = (isset($doc->image->fileName)) ? "/images/" . $doc->image->fileName : "/images/no-image.png"; |
67 | 81 | |
... | ... | @@ -69,7 +83,7 @@ use artbox\core\helpers\ImageHelper; |
69 | 83 | $first .= ' <div class="slider-doc-items"> |
70 | 84 | <div class="slider-doc-img-wr"> |
71 | 85 | <!-- 340x440px--> |
72 | - <img src="' . $docImg1 . '" alt="" class="doctor_long_img"> | |
86 | + ' . $img1 . ' | |
73 | 87 | </div> |
74 | 88 | </div>'; |
75 | 89 | |
... | ... | @@ -77,7 +91,7 @@ use artbox\core\helpers\ImageHelper; |
77 | 91 | $second .= ' <div class="' . $activeStyle . ' slider-doc-main-items" style="display: none;"> |
78 | 92 | <div class="slider-doc-main-item-img"> |
79 | 93 | <div> |
80 | - <img src="' . $docImg2 . '" alt="" class="doctor_long_img"> | |
94 | + ' . $img1 . ' | |
81 | 95 | </div> |
82 | 96 | </div> |
83 | 97 | <div class="slider-doc-main-item-txt"> |
... | ... | @@ -105,7 +119,7 @@ use artbox\core\helpers\ImageHelper; |
105 | 119 | <div class="col-xs-12 col-sm-4 doctor-img-wr"> |
106 | 120 | <div class="doctor-img"> |
107 | 121 | <!--165x165px--> |
108 | - <img src="' . $docImg2 . '" alt="" class="doctor_short_img"> | |
122 | + ' . $img2 . ' | |
109 | 123 | </div> |
110 | 124 | </div> |
111 | 125 | <div class="col-xs-12 col-sm-8"> | ... | ... |