CoreFiles by mySites.guru
default.php52 lines, 1,426 bytes, from Joomla_5.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 5.2.0-beta1
md5
0753bfabe0d058e496d9805ec4b97dba
sha1
5969ba38dd20ef0dc4e111863d38da6a84c4c720
sha256
756a214fc16a4b6b6cb8c56414dc76ccdf36e4144606cbac90b72db9c764933f
<?php

/**
 * @package     Joomla.Site
 * @subpackage  mod_articles
 *
 * @copyright   (C) 2024 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;
use Joomla\String\StringHelper;

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $app->getDocument()->getWebAssetManager();
$wa->registerAndUseStyle('mod_articles', 'mod_articles/mod-articles.css');

if (!$list) {
    return;
}

$groupHeading = 'h4';

if ((bool) $module->showtitle) {
    $modTitle = $params->get('header_tag');

    if ($modTitle == 'h1') {
        $groupHeading = 'h2';
    } elseif ($modTitle == 'h2') {
        $groupHeading = 'h3';
    }
}

$layoutSuffix = $params->get('title_only', 1) ? '_titles' : '_items';

?>


<?php if ($grouped) : ?>
    <?php foreach ($list as $groupName => $items) : ?>
    <div class="mod-articles-group">
        <<?php echo $groupHeading; ?>><?php echo Text::_($groupName); ?></<?php echo $groupHeading; ?>>
        <?php require ModuleHelper::getLayoutPath('mod_articles', $params->get('layout', 'default') . $layoutSuffix); ?>
    </div>
    <?php endforeach; ?>
<?php else : ?>
    <?php $items = $list; ?>
    <?php require ModuleHelper::getLayoutPath('mod_articles', $params->get('layout', 'default') . $layoutSuffix); ?>
<?php endif;

The same content is in 2 releases, Joomla 5.2.0-beta2 to 5.2.0-beta3. See them all, or every version of this file.