Display image intro in Modules: Articles – Category Template

1. Open and edit  “_item.php” file in Joomla folder/modules/mod_articles_category/tmpl/default.php

2. After line 22 “<li>”

21. <?php foreach ($group as $item) : ?>
22. <li>

add:

<?php 
 /* begin customized - Display image intro*/
 $images = json_decode($item->images); // new line

?> 
 <?php if (isset($images->image_intro) and !empty($images->image_intro)) : ?>
 <?php $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; ?>
 
"> image_intro_caption): echo 'class="caption"'.' title="' .htmlspecialchars($images->image_intro_caption) .'"'; endif; ?> src="image_intro); ?>" alt="image_intro_alt); ?>"/>
<?php endif;//end customized ?>

3. Save and refesh web page to view result.

Display intro image in Joompla 3 template

1. Open and edit  “_item.php” file in Joomla folder/modules/mod_articles_news/tmpl/_item.php

2. After line 12, add:

$images = json_decode($item->images);

if( $images->image_intro && $params->get(‘image’) ){
 echo ‘<img src=”‘ . $images->image_intro . ‘” alt=”‘ . htmlspecialchars($article->title) . ‘” />’;
 }

3. Save and refesh web page to view result.