我想在joomla中创建博客模块,在模块中也显示图像

时间:2015-05-05 07:44:25

标签: joomla3.0

我创建了文章类别模块,并选择一个类别来创建博客部分。模块根据我的需要可见(页面上有4列带有介绍文本,但我需要的是,这些介绍文本,图像也应该出现在这些块中)。我想在每一栏中,文章应该出现在介绍文字和图像

1 个答案:

答案 0 :(得分:2)

您需要对位于以下位置的文件进行更改: 的模块/ mod_article_category / TMPL /如default.php 在其他情况下,即没有分组,在你的 li 标签之间的foreach循环中添加这些行:

$article_images = $item->images; // Get image parameters of the article

$pictures = json_decode($article_images); // Split the parameters apart

echo "img src='" . $pictures->{'image_intro'} . "' alt='" . $pictures->{'image_intro_alt'} . "'>"; // get the intro image