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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s