[ 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\HTML\HTMLHelper; 14 use Joomla\CMS\Language\Text; 15 use Joomla\CMS\Router\Route; 16 use Joomla\Component\Content\Site\Helper\RouteHelper; 17 18 $params = $this->params; 19 ?> 20 <div id="archive-items" class="com-content-archive__items"> 21 <?php foreach ($this->items as $i => $item) : ?> 22 <?php $info = $item->params->get('info_block_position', 0); ?> 23 <div class="row<?php echo $i % 2; ?>" itemscope itemtype="https://schema.org/Article"> 24 <div class="page-header"> 25 <h2 itemprop="headline"> 26 <?php if ($params->get('link_titles')) : ?> 27 <a href="<?php echo Route::_(RouteHelper::getArticleRoute($item->slug, $item->catid, $item->language)); ?>" itemprop="url"> 28 <?php echo $this->escape($item->title); ?> 29 </a> 30 <?php else : ?> 31 <?php echo $this->escape($item->title); ?> 32 <?php endif; ?> 33 </h2> 34 35 <?php // Content is generated by content plugin event "onContentAfterTitle" ?> 36 <?php echo $item->event->afterDisplayTitle; ?> 37 38 <?php if ($params->get('show_author') && !empty($item->author)) : ?> 39 <div class="createdby" itemprop="author" itemscope itemtype="https://schema.org/Person"> 40 <?php $author = $item->created_by_alias ?: $item->author; ?> 41 <?php $author = '<span itemprop="name">' . $author . '</span>'; ?> 42 <?php if (!empty($item->contact_link) && $params->get('link_author') == true) : ?> 43 <?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', HTMLHelper::_('link', $this->item->contact_link, $author, array('itemprop' => 'url'))); ?> 44 <?php else : ?> 45 <?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?> 46 <?php endif; ?> 47 </div> 48 <?php endif; ?> 49 </div> 50 <?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') 51 || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category')); ?> 52 <?php if ($useDefList && ($info == 0 || $info == 2)) : ?> 53 <div class="com-content-archive__info article-info text-muted"> 54 <dl class="article-info"> 55 <dt class="article-info-term"> 56 <?php echo Text::_('COM_CONTENT_ARTICLE_INFO'); ?> 57 </dt> 58 59 <?php if ($params->get('show_parent_category') && !empty($item->parent_id)) : ?> 60 <dd> 61 <div class="parent-category-name"> 62 <?php $title = $this->escape($item->parent_title); ?> 63 <?php if ($params->get('link_parent_category') && !empty($item->parent_id)) : ?> 64 <?php $url = '<a href="' . Route::_( 65 RouteHelper::getCategoryRoute($item->parent_id, $item->parent_language) 66 ) 67 . '" itemprop="genre">' . $title . '</a>'; ?> 68 <?php echo Text::sprintf('COM_CONTENT_PARENT', $url); ?> 69 <?php else : ?> 70 <?php echo Text::sprintf('COM_CONTENT_PARENT', '<span itemprop="genre">' . $title . '</span>'); ?> 71 <?php endif; ?> 72 </div> 73 </dd> 74 <?php endif; ?> 75 <?php if ($params->get('show_category')) : ?> 76 <dd> 77 <div class="category-name"> 78 <?php $title = $this->escape($item->category_title); ?> 79 <?php if ($params->get('link_category') && $item->catid) : ?> 80 <?php $url = '<a href="' . Route::_( 81 RouteHelper::getCategoryRoute($item->catid, $item->category_language) 82 ) 83 . '" itemprop="genre">' . $title . '</a>'; ?> 84 <?php echo Text::sprintf('COM_CONTENT_CATEGORY', $url); ?> 85 <?php else : ?> 86 <?php echo Text::sprintf('COM_CONTENT_CATEGORY', '<span itemprop="genre">' . $title . '</span>'); ?> 87 <?php endif; ?> 88 </div> 89 </dd> 90 <?php endif; ?> 91 92 <?php if ($params->get('show_publish_date')) : ?> 93 <dd> 94 <div class="published"> 95 <span class="icon-calendar-alt" aria-hidden="true"></span> 96 <time datetime="<?php echo HTMLHelper::_('date', $item->publish_up, 'c'); ?>" itemprop="datePublished"> 97 <?php echo Text::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC3'))); ?> 98 </time> 99 </div> 100 </dd> 101 <?php endif; ?> 102 103 <?php if ($info == 0) : ?> 104 <?php if ($params->get('show_modify_date')) : ?> 105 <dd> 106 <div class="modified"> 107 <span class="icon-calendar-alt" aria-hidden="true"></span> 108 <time datetime="<?php echo HTMLHelper::_('date', $item->modified, 'c'); ?>" itemprop="dateModified"> 109 <?php echo Text::sprintf('COM_CONTENT_LAST_UPDATED', HTMLHelper::_('date', $item->modified, Text::_('DATE_FORMAT_LC3'))); ?> 110 </time> 111 </div> 112 </dd> 113 <?php endif; ?> 114 <?php if ($params->get('show_create_date')) : ?> 115 <dd> 116 <div class="create"> 117 <span class="icon-calendar-alt" aria-hidden="true"></span> 118 <time datetime="<?php echo HTMLHelper::_('date', $item->created, 'c'); ?>" itemprop="dateCreated"> 119 <?php echo Text::sprintf('COM_CONTENT_CREATED_DATE_ON', HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC3'))); ?> 120 </time> 121 </div> 122 </dd> 123 <?php endif; ?> 124 125 <?php if ($params->get('show_hits')) : ?> 126 <dd> 127 <div class="hits"> 128 <span class="icon-eye"></span> 129 <meta itemprop="interactionCount" content="UserPageVisits:<?php echo $item->hits; ?>"> 130 <?php echo Text::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?> 131 </div> 132 </dd> 133 <?php endif; ?> 134 <?php endif; ?> 135 </dl> 136 </div> 137 <?php endif; ?> 138 139 <?php // Content is generated by content plugin event "onContentBeforeDisplay" ?> 140 <?php echo $item->event->beforeDisplayContent; ?> 141 <?php if ($params->get('show_intro')) : ?> 142 <div class="intro" itemprop="articleBody"> <?php echo HTMLHelper::_('string.truncateComplex', $item->introtext, $params->get('introtext_limit')); ?> </div> 143 <?php endif; ?> 144 145 <?php if ($useDefList && ($info == 1 || $info == 2)) : ?> 146 <div class="article-info text-muted"> 147 <dl class="article-info"> 148 <dt class="article-info-term"><?php echo Text::_('COM_CONTENT_ARTICLE_INFO'); ?></dt> 149 150 <?php if ($info == 1) : ?> 151 <?php if ($params->get('show_parent_category') && !empty($item->parent_id)) : ?> 152 <dd> 153 <div class="parent-category-name"> 154 <?php $title = $this->escape($item->parent_title); ?> 155 <?php if ($params->get('link_parent_category') && $item->parent_id) : ?> 156 <?php $url = '<a href="' . Route::_( 157 RouteHelper::getCategoryRoute($item->parent_id, $item->parent_language) 158 ) 159 . '" itemprop="genre">' . $title . '</a>'; ?> 160 <?php echo Text::sprintf('COM_CONTENT_PARENT', $url); ?> 161 <?php else : ?> 162 <?php echo Text::sprintf('COM_CONTENT_PARENT', '<span itemprop="genre">' . $title . '</span>'); ?> 163 <?php endif; ?> 164 </div> 165 </dd> 166 <?php endif; ?> 167 <?php if ($params->get('show_category')) : ?> 168 <dd> 169 <div class="category-name"> 170 <?php $title = $this->escape($item->category_title); ?> 171 <?php if ($params->get('link_category') && $item->catid) : ?> 172 <?php $url = '<a href="' . Route::_( 173 RouteHelper::getCategoryRoute($item->catid, $item->category_language) 174 ) 175 . '" itemprop="genre">' . $title . '</a>'; ?> 176 <?php echo Text::sprintf('COM_CONTENT_CATEGORY', $url); ?> 177 <?php else : ?> 178 <?php echo Text::sprintf('COM_CONTENT_CATEGORY', '<span itemprop="genre">' . $title . '</span>'); ?> 179 <?php endif; ?> 180 </div> 181 </dd> 182 <?php endif; ?> 183 <?php if ($params->get('show_publish_date')) : ?> 184 <dd> 185 <div class="published"> 186 <span class="icon-calendar-alt" aria-hidden="true"></span> 187 <time datetime="<?php echo HTMLHelper::_('date', $item->publish_up, 'c'); ?>" itemprop="datePublished"> 188 <?php echo Text::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC3'))); ?> 189 </time> 190 </div> 191 </dd> 192 <?php endif; ?> 193 <?php endif; ?> 194 195 <?php if ($params->get('show_create_date')) : ?> 196 <dd> 197 <div class="create"> 198 <span class="icon-calendar-alt" aria-hidden="true"></span> 199 <time datetime="<?php echo HTMLHelper::_('date', $item->created, 'c'); ?>" itemprop="dateCreated"> 200 <?php echo Text::sprintf('COM_CONTENT_CREATED_DATE_ON', HTMLHelper::_('date', $item->modified, Text::_('DATE_FORMAT_LC3'))); ?> 201 </time> 202 </div> 203 </dd> 204 <?php endif; ?> 205 <?php if ($params->get('show_modify_date')) : ?> 206 <dd> 207 <div class="modified"> 208 <span class="icon-calendar-alt" aria-hidden="true"></span> 209 <time datetime="<?php echo HTMLHelper::_('date', $item->modified, 'c'); ?>" itemprop="dateModified"> 210 <?php echo Text::sprintf('COM_CONTENT_LAST_UPDATED', HTMLHelper::_('date', $item->modified, Text::_('DATE_FORMAT_LC3'))); ?> 211 </time> 212 </div> 213 </dd> 214 <?php endif; ?> 215 <?php if ($params->get('show_hits')) : ?> 216 <dd> 217 <div class="hits"> 218 <span class="icon-eye"></span> 219 <meta content="UserPageVisits:<?php echo $item->hits; ?>" itemprop="interactionCount"> 220 <?php echo Text::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?> 221 </div> 222 </dd> 223 <?php endif; ?> 224 </dl> 225 </div> 226 <?php endif; ?> 227 <?php // Content is generated by content plugin event "onContentAfterDisplay" ?> 228 <?php echo $item->event->afterDisplayContent; ?> 229 </div> 230 <?php endforeach; ?> 231 </div> 232 <div class="com-content-archive__navigation w-100"> 233 <?php if ($this->params->def('show_pagination_results', 1)) : ?> 234 <p class="com-content-archive__counter counter float-end pt-3 pe-2"> 235 <?php echo $this->pagination->getPagesCounter(); ?> 236 </p> 237 <?php endif; ?> 238 <div class="com-content-archive__pagination"> 239 <?php echo $this->pagination->getPagesLinks(); ?> 240 </div> 241 </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 |