[ 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_content 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\Factory; 14 use Joomla\CMS\HTML\HTMLHelper; 15 use Joomla\CMS\Language\Text; 16 use Joomla\CMS\Layout\FileLayout; 17 use Joomla\CMS\Layout\LayoutHelper; 18 19 $app = Factory::getApplication(); 20 21 $this->category->text = $this->category->description; 22 $app->triggerEvent('onContentPrepare', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); 23 $this->category->description = $this->category->text; 24 25 $results = $app->triggerEvent('onContentAfterTitle', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); 26 $afterDisplayTitle = trim(implode("\n", $results)); 27 28 $results = $app->triggerEvent('onContentBeforeDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); 29 $beforeDisplayContent = trim(implode("\n", $results)); 30 31 $results = $app->triggerEvent('onContentAfterDisplay', array($this->category->extension . '.categories', &$this->category, &$this->params, 0)); 32 $afterDisplayContent = trim(implode("\n", $results)); 33 34 $htag = $this->params->get('show_page_heading') ? 'h2' : 'h1'; 35 36 ?> 37 <div class="com-content-category-blog blog" itemscope itemtype="https://schema.org/Blog"> 38 <?php if ($this->params->get('show_page_heading')) : ?> 39 <div class="page-header"> 40 <h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1> 41 </div> 42 <?php endif; ?> 43 44 <?php if ($this->params->get('show_category_title', 1)) : ?> 45 <<?php echo $htag; ?>> 46 <?php echo $this->category->title; ?> 47 </<?php echo $htag; ?>> 48 <?php endif; ?> 49 <?php echo $afterDisplayTitle; ?> 50 51 <?php if ($this->params->get('show_cat_tags', 1) && !empty($this->category->tags->itemTags)) : ?> 52 <?php $this->category->tagLayout = new FileLayout('joomla.content.tags'); ?> 53 <?php echo $this->category->tagLayout->render($this->category->tags->itemTags); ?> 54 <?php endif; ?> 55 56 <?php if ($beforeDisplayContent || $afterDisplayContent || $this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?> 57 <div class="category-desc clearfix"> 58 <?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?> 59 <?php echo LayoutHelper::render( 60 'joomla.html.image', 61 [ 62 'src' => $this->category->getParams()->get('image'), 63 'alt' => empty($this->category->getParams()->get('image_alt')) && empty($this->category->getParams()->get('image_alt_empty')) ? false : $this->category->getParams()->get('image_alt'), 64 ] 65 ); ?> 66 <?php endif; ?> 67 <?php echo $beforeDisplayContent; ?> 68 <?php if ($this->params->get('show_description') && $this->category->description) : ?> 69 <?php echo HTMLHelper::_('content.prepare', $this->category->description, '', 'com_content.category'); ?> 70 <?php endif; ?> 71 <?php echo $afterDisplayContent; ?> 72 </div> 73 <?php endif; ?> 74 75 <?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?> 76 <?php if ($this->params->get('show_no_articles', 1)) : ?> 77 <div class="alert alert-info"> 78 <span class="icon-info-circle" aria-hidden="true"></span><span class="visually-hidden"><?php echo Text::_('INFO'); ?></span> 79 <?php echo Text::_('COM_CONTENT_NO_ARTICLES'); ?> 80 </div> 81 <?php endif; ?> 82 <?php endif; ?> 83 84 <?php if (!empty($this->lead_items)) : ?> 85 <div class="com-content-category-blog__items blog-items items-leading <?php echo $this->params->get('blog_class_leading'); ?>"> 86 <?php foreach ($this->lead_items as &$item) : ?> 87 <div class="com-content-category-blog__item blog-item" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting"> 88 <?php 89 $this->item = &$item; 90 echo $this->loadTemplate('item'); 91 ?> 92 </div> 93 <?php endforeach; ?> 94 </div> 95 <?php endif; ?> 96 97 <?php if (!empty($this->intro_items)) : ?> 98 <?php $blogClass = $this->params->get('blog_class', ''); ?> 99 <?php if ((int) $this->params->get('num_columns') > 1) : ?> 100 <?php $blogClass .= (int) $this->params->get('multi_column_order', 0) === 0 ? ' masonry-' : ' columns-'; ?> 101 <?php $blogClass .= (int) $this->params->get('num_columns'); ?> 102 <?php endif; ?> 103 <div class="com-content-category-blog__items blog-items <?php echo $blogClass; ?>"> 104 <?php foreach ($this->intro_items as $key => &$item) : ?> 105 <div class="com-content-category-blog__item blog-item" 106 itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting"> 107 <?php 108 $this->item = & $item; 109 echo $this->loadTemplate('item'); 110 ?> 111 </div> 112 <?php endforeach; ?> 113 </div> 114 <?php endif; ?> 115 116 <?php if (!empty($this->link_items)) : ?> 117 <div class="items-more"> 118 <?php echo $this->loadTemplate('links'); ?> 119 </div> 120 <?php endif; ?> 121 122 <?php if ($this->maxLevel != 0 && !empty($this->children[$this->category->id])) : ?> 123 <div class="com-content-category-blog__children cat-children"> 124 <?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?> 125 <h3> <?php echo Text::_('JGLOBAL_SUBCATEGORIES'); ?> </h3> 126 <?php endif; ?> 127 <?php echo $this->loadTemplate('children'); ?> </div> 128 <?php endif; ?> 129 <?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->pagesTotal > 1)) : ?> 130 <div class="com-content-category-blog__navigation w-100"> 131 <?php if ($this->params->def('show_pagination_results', 1)) : ?> 132 <p class="com-content-category-blog__counter counter float-end pt-3 pe-2"> 133 <?php echo $this->pagination->getPagesCounter(); ?> 134 </p> 135 <?php endif; ?> 136 <div class="com-content-category-blog__pagination"> 137 <?php echo $this->pagination->getPagesLinks(); ?> 138 </div> 139 </div> 140 <?php endif; ?> 141 </div>
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 |