[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_tags/tmpl/tag/ -> list.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  $n    = count($this->items);
  17  $htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
  18  
  19  ?>
  20  
  21  <div class="com-tags-tag-list tag-category">
  22  
  23      <?php if ($this->params->get('show_page_heading')) : ?>
  24          <h1>
  25              <?php echo $this->escape($this->params->get('page_heading')); ?>
  26          </h1>
  27      <?php endif; ?>
  28  
  29      <?php if ($this->params->get('show_tag_title', 1)) : ?>
  30          <<?php echo $htag; ?>>
  31              <?php echo HTMLHelper::_('content.prepare', $this->tags_title, '', 'com_tag.tag'); ?>
  32          </<?php echo $htag; ?>>
  33      <?php endif; ?>
  34  
  35      <?php // We only show a tag description if there is a single tag. ?>
  36      <?php if (count($this->item) === 1 && ($this->params->get('tag_list_show_tag_image', 1) || $this->params->get('tag_list_show_tag_description', 1))) : ?>
  37          <div class="com-tags-tag-list__description category-desc">
  38              <?php $images = json_decode($this->item[0]->images); ?>
  39              <?php if ($this->params->get('tag_list_show_tag_image', 1) == 1 && !empty($images->image_fulltext)) : ?>
  40                  <?php echo HTMLHelper::_('image', $images->image_fulltext, ''); ?>
  41              <?php endif; ?>
  42              <?php if ($this->params->get('tag_list_show_tag_description') == 1 && $this->item[0]->description) : ?>
  43                  <?php echo HTMLHelper::_('content.prepare', $this->item[0]->description, '', 'com_tags.tag'); ?>
  44              <?php endif; ?>
  45          </div>
  46      <?php endif; ?>
  47  
  48      <?php // If there are multiple tags and a description or image has been supplied use that. ?>
  49      <?php if ($this->params->get('tag_list_show_tag_description', 1) || $this->params->get('show_description_image', 1)) : ?>
  50          <?php if ($this->params->get('show_description_image', 1) == 1 && $this->params->get('tag_list_image')) : ?>
  51              <?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')); ?>
  52          <?php endif; ?>
  53          <?php if ($this->params->get('tag_list_description', '') > '') : ?>
  54              <?php echo HTMLHelper::_('content.prepare', $this->params->get('tag_list_description'), '', 'com_tags.tag'); ?>
  55          <?php endif; ?>
  56      <?php endif; ?>
  57      <?php echo $this->loadTemplate('items'); ?>
  58  </div>


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