[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Site 5 * @subpackage com_contact 6 * 7 * @copyright (C) 2009 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\Router\Route; 16 use Joomla\Component\Contact\Site\Helper\RouteHelper; 17 18 if ($this->maxLevel != 0 && count($this->children[$this->category->id]) > 0) : 19 ?> 20 <ul class="com-contact-category__children list-striped list-condensed"> 21 <?php foreach ($this->children[$this->category->id] as $id => $child) : ?> 22 <?php if ($this->params->get('show_empty_categories') || $child->numitems || count($child->getChildren())) : ?> 23 <li> 24 <h4 class="item-title"> 25 <a href="<?php echo Route::_(RouteHelper::getCategoryRoute($child->id, $child->language)); ?>"> 26 <?php echo $this->escape($child->title); ?> 27 </a> 28 29 <?php if ($this->params->get('show_cat_items') == 1) : ?> 30 <span class="badge bg-info float-end" title="<?php echo Text::_('COM_CONTACT_CAT_NUM'); ?>"><?php echo $child->numitems; ?></span> 31 <?php endif; ?> 32 </h4> 33 34 <?php if ($this->params->get('show_subcat_desc') == 1) : ?> 35 <?php if ($child->description) : ?> 36 <div class="category-desc"> 37 <?php echo HTMLHelper::_('content.prepare', $child->description, '', 'com_contact.category'); ?> 38 </div> 39 <?php endif; ?> 40 <?php endif; ?> 41 42 <?php if (count($child->getChildren()) > 0) : 43 $this->children[$child->id] = $child->getChildren(); 44 $this->category = $child; 45 $this->maxLevel--; 46 echo $this->loadTemplate('children'); 47 $this->category = $child->getParent(); 48 $this->maxLevel++; 49 endif; ?> 50 </li> 51 <?php endif; ?> 52 <?php endforeach; ?> 53 </ul> 54 <?php endif; ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |