[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_tags/tmpl/tag/ -> default.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  com_tags
   6   *
   7   * @copyright   (C) 2013 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  
  15  // Note that there are certain parts of this layout used only when there is exactly one tag.
  16  $isSingleTag = count($this->item) === 1;
  17  $htag        = $this->params->get('show_page_heading') ? 'h2' : 'h1';
  18  ?>
  19  
  20  <div class="com-tags-tag tag-category">
  21  
  22      <?php if ($this->params->get('show_page_heading')) : ?>
  23          <h1>
  24              <?php echo $this->escape($this->params->get('page_heading')); ?>
  25          </h1>
  26      <?php endif; ?>
  27  
  28      <?php if ($this->params->get('show_tag_title', 1)) : ?>
  29          <<?php echo $htag; ?>>
  30              <?php echo HTMLHelper::_('content.prepare', $this->tags_title, '', 'com_tag.tag'); ?>
  31          </<?php echo $htag; ?>>
  32      <?php endif; ?>
  33  
  34      <?php // We only show a tag description if there is a single tag. ?>
  35      <?php if (count($this->item) === 1 && ($this->params->get('tag_list_show_tag_image', 1) || $this->params->get('tag_list_show_tag_description', 1))) : ?>
  36          <div class="com-tags-tag__description category-desc">
  37              <?php $images = json_decode($this->item[0]->images); ?>
  38              <?php if ($this->params->get('tag_list_show_tag_image', 1) == 1 && !empty($images->image_fulltext)) : ?>
  39                  <?php echo HTMLHelper::_('image', $images->image_fulltext, $images->image_fulltext_alt); ?>
  40              <?php endif; ?>
  41              <?php if ($this->params->get('tag_list_show_tag_description') == 1 && $this->item[0]->description) : ?>
  42                  <?php echo HTMLHelper::_('content.prepare', $this->item[0]->description, '', 'com_tags.tag'); ?>
  43              <?php endif; ?>
  44          </div>
  45      <?php endif; ?>
  46  
  47      <?php // If there are multiple tags and a description or image has been supplied use that. ?>
  48      <?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
  49          <?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
  50              <?php echo HTMLHelper::_('image', $this->params->get('tag_list_image'), empty($this->params->get('tag_list_image_alt')) && empty($this->params->get('tag_list_image_alt_empty')) ? false : $this->params->get('tag_list_image_alt')); ?>
  51          <?php endif; ?>
  52          <?php if ($this->params->get('tag_list_description', '') > '') : ?>
  53              <?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
  54          <?php endif; ?>
  55      <?php endif; ?>
  56      <?php echo $this->loadTemplate('items'); ?>
  57  
  58      <?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?>
  59          <div class="com-tags-tag__pagination w-100">
  60              <?php if ($this->params->def('show_pagination_results', 1)) : ?>
  61                  <p class="counter float-end pt-3 pe-2">
  62                      <?php echo $this->pagination->getPagesCounter(); ?>
  63                  </p>
  64              <?php endif; ?>
  65              <?php echo $this->pagination->getPagesLinks(); ?>
  66          </div>
  67      <?php endif; ?>
  68  </div>


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