Skip to content

Instantly share code, notes, and snippets.

@drmmr763
Created May 14, 2012 01:03
Show Gist options
  • Save drmmr763/2691048 to your computer and use it in GitHub Desktop.
Save drmmr763/2691048 to your computer and use it in GitHub Desktop.
default.php joomla 2.5 latest news (with intro image support)
// no direct access
defined('_JEXEC') or die;
?>
<ul class="latestnews<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<li>
<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?></a>
<?php //json decodes the image object and gets the intro image source. ?>
<img src="<?php echo json_decode($item->images)->image_intro; ?>" />
</li>
<?php endforeach; ?>
</ul>
@12345678--
Copy link

2017-01-04_130157 copy

images)->image_intro; ?> images)->image_intro_alt; ?>

like this hoe to call the link marking the attach one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment