[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/components/com_newsfeeds/tmpl/category/ -> default.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Site
   5   * @subpackage  com_newsfeeds
   6   *
   7   * @copyright   (C) 2006 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\FileLayout;
  16  use Joomla\CMS\Layout\LayoutHelper;
  17  
  18  $htag = $this->params->get('show_page_heading') ? 'h2' : 'h1';
  19  ?>
  20  <div class="com-newsfeeds-category newsfeed-category">
  21      <?php if ($this->params->get('show_page_heading')) : ?>
  22          <h1>
  23              <?php echo $this->escape($this->params->get('page_heading')); ?>
  24          </h1>
  25      <?php endif; ?>
  26      <?php if ($this->params->get('show_category_title', 1)) : ?>
  27          <<?php echo $htag; ?>>
  28              <?php echo HTMLHelper::_('content.prepare', $this->category->title, '', 'com_newsfeeds.category.title'); ?>
  29          </<?php echo $htag; ?>>
  30      <?php endif; ?>
  31      <?php if ($this->params->get('show_tags', 1) && !empty($this->category->tags->itemTags)) : ?>
  32          <?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?>
  33          <?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?>
  34      <?php endif; ?>
  35      <?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
  36          <div class="com-newsfeeds-category__description category-desc">
  37              <?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
  38                  <?php echo LayoutHelper::render(
  39                      'joomla.html.image',
  40                      [
  41                          'src' => $this->category->getParams()->get('image'),
  42                          'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? false : $this->category->getParams()->get('image_alt'),
  43                      ]
  44                  ); ?>
  45              <?php endif; ?>
  46              <?php if ($this->params->get('show_description') && $this->category->description) : ?>
  47                  <?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_newsfeeds.category'); ?>
  48              <?php endif; ?>
  49              <div class="clr"></div>
  50          </div>
  51      <?php endif; ?>
  52      <?php echo $this->loadTemplate('items'); ?>
  53      <?php if ($this->maxLevel != 0 && !empty($this->children[$this->category->id])) : ?>
  54          <div class="com-newsfeeds-category__children cat-children">
  55              <h3>
  56                  <?php echo Text::_('JGLOBAL_SUBCATEGORIES'); ?>
  57              </h3>
  58              <?php echo $this->loadTemplate('children'); ?>
  59          </div>
  60      <?php endif; ?>
  61  </div>


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