[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/modules/mod_articles_categories/tmpl/ -> default_items.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  mod_articles_categories
   6   *
   7   * @copyright   (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  defined('_JEXEC') or die;
  12  
  13  use Joomla\CMS\Helper\ModuleHelper;
  14  use Joomla\CMS\HTML\HTMLHelper;
  15  use Joomla\CMS\Router\Route;
  16  use Joomla\Component\Content\Site\Helper\RouteHelper;
  17  
  18  $input  = $app->input;
  19  $option = $input->getCmd('option');
  20  $view   = $input->getCmd('view');
  21  $id     = $input->getInt('id');
  22  
  23  foreach ($list as $item) : ?>
  24      <li<?php if ($id == $item->id && in_array($view, array('category', 'categories')) && $option == 'com_content') {
  25          echo ' class="active"';
  26         } ?>> <?php $levelup = $item->level - $startLevel - 1; ?>
  27          <a href="<?php echo Route::_(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>">
  28          <?php echo $item->title; ?>
  29              <?php if ($params->get('numitems')) : ?>
  30                  (<?php echo $item->numitems; ?>)
  31              <?php endif; ?>
  32          </a>
  33  
  34          <?php if ($params->get('show_description', 0)) : ?>
  35              <?php echo HTMLHelper::_('content.prepare', $item->description, $item->getParams(), 'mod_articles_categories.content'); ?>
  36          <?php endif; ?>
  37          <?php if (
  38          $params->get('show_children', 0) && (($params->get('maxlevel', 0) == 0)
  39              || ($params->get('maxlevel') >= ($item->level - $startLevel)))
  40              && count($item->getChildren())
  41  ) : ?>
  42              <?php echo '<ul>'; ?>
  43              <?php $temp = $list; ?>
  44              <?php $list = $item->getChildren(); ?>
  45              <?php require ModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default') . '_items'); ?>
  46              <?php $list = $temp; ?>
  47              <?php echo '</ul>'; ?>
  48          <?php endif; ?>
  49      </li>
  50  <?php endforeach; ?>


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer