NEWSBLOG

Display ARTICLE IMAGE in an override (LIST - PORTAL)

Display ARTICLE IMAGE in an override (LIST - PORTAL)

LIST

<?php
			$article_images  = json_decode($item->images);
			$article_image   = '';
			$article_image_alt   = '';
			if(isset($article_images->image_intro) && !empty($article_images->image_intro)) {
				$article_image  = $article_images->image_intro;
				$article_image_alt  = $article_images->image_intro_alt;
			}?> 


  <img src="/<?php echo $article_image; ?>" alt="<?php echo $article_image_alt; ?>" class="">

PORTAL

<?php 
				$article_image   = [];
				$article_image_alt   = [];
			?>
			<?php foreach ($list as $item) : ?>
				<!-- Intro image -->
				<?php
					$article_images  = json_decode($item->images);
					
					if(isset($article_images->image_intro) && !empty($article_images->image_intro)) {
						$article_image[$item->id]  = $article_images->image_intro;
						$article_image_alt[$item->id]  = $article_images->image_intro_alt;
					} 
				?> 


<img style="width: 100% !important;" class="shadow-sm rounded-3" src="/<?php echo $article_image[$list[0]->id]; ?>" alt="<?php echo $article_image_alt[$list[0]->id]; ?>" />
ARITHMOS.GR - With none  none none From GREECE - Thank you for visiting.