This Joomla 4 override allows you to display a list of articles with an icon simply using Joomla's mod_articles_category
module. At the bottom of this article, you can download the files of the J4 version of this override.
Joomla 4 frontend rendering
PhP markup
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_category
* @author web-eau.net
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Text;
if (!$list)
{
return;
}
?>
<ul class="list-group list-group-flush list-group-item-action category-module<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<li class="list-group-item list-group-item-action py-2 list-unstyled">
<?php if ($params->get('link_titles') == 1) : ?>
<i class="far fa-file-alt me-1"></i> <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
<?php else : ?>
<?php echo $item->title; ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<p class="ms-3 p-2"><strong><i class="far fa-arrow-alt-circle-right"></i></strong> see all articles in category
<span class="mod-articles-category-category">
<?php echo $item->displayCategoryTitle; ?>
</span>
</p>
Download the override
override-articles-list-j4.zipInstall the override
Enjoy the override
This Joomla 3 override allows you to display a list of articles with an icon simply using Joomla's mod_articles_category
module. At the bottom of this article, you can download the files of the J3 version of this override.
Joomla 3 frontend rendering
PhP markup
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_category
* @Author web-eau.net
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<ul class="list-group list-group-flush list-group-item-action category-module<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<li class="list-group-item list-group-item-action py-2 list-unstyled">
<?php if ($params->get('link_titles') == 1) : ?>
<i class="fa fa-file-text-o mr-1"></i> <a class="mod-articles-category-title <?php echo $item->active; ?>" href="/<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
<?php else : ?>
<?php echo $item->title; ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<p class="py-2"><strong><i class="fa fa-arrow-circle-o-right"></i></strong> see all articles in category
<span class="mod-articles-category-category vert">
<?php echo $item->displayCategoryTitle; ?>
</span></p>