[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

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

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  mod_articles_category
   6   *
   7   * @copyright   (C) 2020 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\HTML\HTMLHelper;
  14  use Joomla\CMS\Language\Text;
  15  use Joomla\CMS\Layout\LayoutHelper;
  16  
  17  ?>
  18  <?php foreach ($items as $item) : ?>
  19  <li>
  20      <?php if ($params->get('link_titles') == 1) : ?>
  21          <?php $attributes = ['class' => 'mod-articles-category-title ' . $item->active]; ?>
  22          <?php $link = htmlspecialchars($item->link, ENT_COMPAT, 'UTF-8', false); ?>
  23          <?php $title = htmlspecialchars($item->title, ENT_COMPAT, 'UTF-8', false); ?>
  24          <?php echo HTMLHelper::_('link', $link, $title, $attributes); ?>
  25      <?php else : ?>
  26          <?php echo $item->title; ?>
  27      <?php endif; ?>
  28  
  29      <?php if ($item->displayHits) : ?>
  30          <span class="mod-articles-category-hits">
  31              (<?php echo $item->displayHits; ?>)
  32          </span>
  33      <?php endif; ?>
  34  
  35      <?php if ($params->get('show_author')) : ?>
  36          <span class="mod-articles-category-writtenby">
  37              <?php echo $item->displayAuthorName; ?>
  38          </span>
  39      <?php endif; ?>
  40  
  41      <?php if ($item->displayCategoryTitle) : ?>
  42          <span class="mod-articles-category-category">
  43              (<?php echo $item->displayCategoryTitle; ?>)
  44          </span>
  45      <?php endif; ?>
  46  
  47      <?php if ($item->displayDate) : ?>
  48          <span class="mod-articles-category-date"><?php echo $item->displayDate; ?></span>
  49      <?php endif; ?>
  50  
  51      <?php if ($params->get('show_tags', 0) && $item->tags->itemTags) : ?>
  52          <div class="mod-articles-category-tags">
  53              <?php echo LayoutHelper::render('joomla.content.tags', $item->tags->itemTags); ?>
  54          </div>
  55      <?php endif; ?>
  56  
  57      <?php if ($params->get('show_introtext')) : ?>
  58          <p class="mod-articles-category-introtext">
  59              <?php echo $item->displayIntrotext; ?>
  60          </p>
  61      <?php endif; ?>
  62  
  63      <?php if ($params->get('show_readmore')) : ?>
  64          <p class="mod-articles-category-readmore">
  65              <a class="mod-articles-category-title <?php echo $item->active; ?>" href="<?php echo $item->link; ?>">
  66                  <?php if ($item->params->get('access-view') == false) : ?>
  67                      <?php echo Text::_('MOD_ARTICLES_CATEGORY_REGISTER_TO_READ_MORE'); ?>
  68                  <?php elseif ($item->alternative_readmore) : ?>
  69                      <?php echo $item->alternative_readmore; ?>
  70                      <?php echo HTMLHelper::_('string.truncate', $item->title, $params->get('readmore_limit')); ?>
  71                          <?php if ($params->get('show_readmore_title', 0)) : ?>
  72                              <?php echo HTMLHelper::_('string.truncate', $item->title, $params->get('readmore_limit')); ?>
  73                          <?php endif; ?>
  74                  <?php elseif ($params->get('show_readmore_title', 0)) : ?>
  75                      <?php echo Text::_('MOD_ARTICLES_CATEGORY_READ_MORE'); ?>
  76                      <?php echo HTMLHelper::_('string.truncate', $item->title, $params->get('readmore_limit')); ?>
  77                  <?php else : ?>
  78                      <?php echo Text::_('MOD_ARTICLES_CATEGORY_READ_MORE_TITLE'); ?>
  79                  <?php endif; ?>
  80              </a>
  81          </p>
  82      <?php endif; ?>
  83  </li>
  84  <?php endforeach; ?>


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