|
11 | 11 | defined('_JEXEC') or die; |
12 | 12 |
|
13 | 13 | use Joomla\CMS\HTML\HTMLHelper; |
14 | | -use Joomla\CMS\Language\Text; |
| 14 | +use Joomla\CMS\Layout\LayoutHelper; |
15 | 15 | use Joomla\CMS\Router\Route; |
16 | 16 | use Joomla\Component\Content\Site\Helper\RouteHelper; |
17 | 17 |
|
|
36 | 36 | <?php // Content is generated by content plugin event "onContentAfterTitle" ?> |
37 | 37 | <?php echo $item->event->afterDisplayTitle; ?> |
38 | 38 |
|
39 | | - <?php if ($params->get('show_author') && !empty($item->author)) : ?> |
40 | | - <div class="createdby"> |
41 | | - <?php $author = $item->created_by_alias ?: $item->author; ?> |
42 | | - <?php $author = '<span>' . $author . '</span>'; ?> |
43 | | - <?php if (!empty($item->contact_link) && $params->get('link_author') == true) : ?> |
44 | | - <?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', HTMLHelper::_('link', $this->item->contact_link, $author, ['itemprop' => 'url'])); ?> |
45 | | - <?php else : ?> |
46 | | - <?php echo Text::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?> |
47 | | - <?php endif; ?> |
48 | | - </div> |
49 | | - <?php endif; ?> |
50 | 39 | </div> |
51 | 40 | <?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') |
52 | 41 | || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category')); ?> |
53 | 42 | <?php if ($useDefList && ($info == 0 || $info == 2)) : ?> |
54 | | - <div class="com-content-archive__info article-info text-muted"> |
55 | | - <dl class="article-info"> |
56 | | - <dt class="article-info-term"> |
57 | | - <?php echo Text::_('COM_CONTENT_ARTICLE_INFO'); ?> |
58 | | - </dt> |
59 | | - |
60 | | - <?php if ($params->get('show_parent_category') && !empty($item->parent_id)) : ?> |
61 | | - <dd> |
62 | | - <div class="parent-category-name"> |
63 | | - <?php $title = $this->escape($item->parent_title); ?> |
64 | | - <?php if ($params->get('link_parent_category') && !empty($item->parent_id)) : ?> |
65 | | - <?php $url = '<a href="' . Route::_( |
66 | | - RouteHelper::getCategoryRoute($item->parent_id, $item->parent_language) |
67 | | - ) |
68 | | - . '">' . $title . '</a>'; ?> |
69 | | - <?php echo Text::sprintf('COM_CONTENT_PARENT', $url); ?> |
70 | | - <?php else : ?> |
71 | | - <?php echo Text::sprintf('COM_CONTENT_PARENT', '<span>' . $title . '</span>'); ?> |
72 | | - <?php endif; ?> |
73 | | - </div> |
74 | | - </dd> |
75 | | - <?php endif; ?> |
76 | | - <?php if ($params->get('show_category')) : ?> |
77 | | - <dd> |
78 | | - <div class="category-name"> |
79 | | - <?php $title = $this->escape($item->category_title); ?> |
80 | | - <?php if ($params->get('link_category') && $item->catid) : ?> |
81 | | - <?php $url = '<a href="' . Route::_( |
82 | | - RouteHelper::getCategoryRoute($item->catid, $item->category_language) |
83 | | - ) |
84 | | - . '">' . $title . '</a>'; ?> |
85 | | - <?php echo Text::sprintf('COM_CONTENT_CATEGORY', $url); ?> |
86 | | - <?php else : ?> |
87 | | - <?php echo Text::sprintf('COM_CONTENT_CATEGORY', '<span>' . $title . '</span>'); ?> |
88 | | - <?php endif; ?> |
89 | | - </div> |
90 | | - </dd> |
91 | | - <?php endif; ?> |
92 | | - |
93 | | - <?php if ($params->get('show_publish_date')) : ?> |
94 | | - <dd> |
95 | | - <div class="published"> |
96 | | - <span class="icon-calendar-alt" aria-hidden="true"></span> |
97 | | - <time datetime="<?php echo HTMLHelper::_('date', $item->publish_up, 'c'); ?>"> |
98 | | - <?php echo Text::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC3'))); ?> |
99 | | - </time> |
100 | | - </div> |
101 | | - </dd> |
102 | | - <?php endif; ?> |
103 | | - |
104 | | - <?php if ($info == 0) : ?> |
105 | | - <?php if ($params->get('show_modify_date')) : ?> |
106 | | - <dd> |
107 | | - <div class="modified"> |
108 | | - <span class="icon-calendar-alt" aria-hidden="true"></span> |
109 | | - <time datetime="<?php echo HTMLHelper::_('date', $item->modified, 'c'); ?>"> |
110 | | - <?php echo Text::sprintf('COM_CONTENT_LAST_UPDATED', HTMLHelper::_('date', $item->modified, Text::_('DATE_FORMAT_LC3'))); ?> |
111 | | - </time> |
112 | | - </div> |
113 | | - </dd> |
114 | | - <?php endif; ?> |
115 | | - <?php if ($params->get('show_create_date')) : ?> |
116 | | - <dd> |
117 | | - <div class="create"> |
118 | | - <span class="icon-calendar-alt" aria-hidden="true"></span> |
119 | | - <time datetime="<?php echo HTMLHelper::_('date', $item->created, 'c'); ?>"> |
120 | | - <?php echo Text::sprintf('COM_CONTENT_CREATED_DATE_ON', HTMLHelper::_('date', $item->created, Text::_('DATE_FORMAT_LC3'))); ?> |
121 | | - </time> |
122 | | - </div> |
123 | | - </dd> |
124 | | - <?php endif; ?> |
125 | | - |
126 | | - <?php if ($params->get('show_hits')) : ?> |
127 | | - <dd> |
128 | | - <div class="hits"> |
129 | | - <span class="icon-eye"></span> |
130 | | - <meta content="UserPageVisits:<?php echo $item->hits; ?>"> |
131 | | - <?php echo Text::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?> |
132 | | - </div> |
133 | | - </dd> |
134 | | - <?php endif; ?> |
135 | | - <?php endif; ?> |
136 | | - </dl> |
137 | | - </div> |
| 43 | + <?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $item, 'params' => $params, 'position' => 'above']); ?> |
138 | 44 | <?php endif; ?> |
139 | 45 |
|
140 | 46 | <?php // Content is generated by content plugin event "onContentBeforeDisplay" ?> |
|
144 | 50 | <?php endif; ?> |
145 | 51 |
|
146 | 52 | <?php if ($useDefList && ($info == 1 || $info == 2)) : ?> |
147 | | - <div class="article-info text-muted"> |
148 | | - <dl class="article-info"> |
149 | | - <dt class="article-info-term"><?php echo Text::_('COM_CONTENT_ARTICLE_INFO'); ?></dt> |
150 | | - |
151 | | - <?php if ($info == 1) : ?> |
152 | | - <?php if ($params->get('show_parent_category') && !empty($item->parent_id)) : ?> |
153 | | - <dd> |
154 | | - <div class="parent-category-name"> |
155 | | - <?php $title = $this->escape($item->parent_title); ?> |
156 | | - <?php if ($params->get('link_parent_category') && $item->parent_id) : ?> |
157 | | - <?php $url = '<a href="' . Route::_( |
158 | | - RouteHelper::getCategoryRoute($item->parent_id, $item->parent_language) |
159 | | - ) |
160 | | - . '">' . $title . '</a>'; ?> |
161 | | - <?php echo Text::sprintf('COM_CONTENT_PARENT', $url); ?> |
162 | | - <?php else : ?> |
163 | | - <?php echo Text::sprintf('COM_CONTENT_PARENT', '<span>' . $title . '</span>'); ?> |
164 | | - <?php endif; ?> |
165 | | - </div> |
166 | | - </dd> |
167 | | - <?php endif; ?> |
168 | | - <?php if ($params->get('show_category')) : ?> |
169 | | - <dd> |
170 | | - <div class="category-name"> |
171 | | - <?php $title = $this->escape($item->category_title); ?> |
172 | | - <?php if ($params->get('link_category') && $item->catid) : ?> |
173 | | - <?php $url = '<a href="' . Route::_( |
174 | | - RouteHelper::getCategoryRoute($item->catid, $item->category_language) |
175 | | - ) |
176 | | - . '">' . $title . '</a>'; ?> |
177 | | - <?php echo Text::sprintf('COM_CONTENT_CATEGORY', $url); ?> |
178 | | - <?php else : ?> |
179 | | - <?php echo Text::sprintf('COM_CONTENT_CATEGORY', '<span>' . $title . '</span>'); ?> |
180 | | - <?php endif; ?> |
181 | | - </div> |
182 | | - </dd> |
183 | | - <?php endif; ?> |
184 | | - <?php if ($params->get('show_publish_date')) : ?> |
185 | | - <dd> |
186 | | - <div class="published"> |
187 | | - <span class="icon-calendar-alt" aria-hidden="true"></span> |
188 | | - <time datetime="<?php echo HTMLHelper::_('date', $item->publish_up, 'c'); ?>"> |
189 | | - <?php echo Text::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', HTMLHelper::_('date', $item->publish_up, Text::_('DATE_FORMAT_LC3'))); ?> |
190 | | - </time> |
191 | | - </div> |
192 | | - </dd> |
193 | | - <?php endif; ?> |
194 | | - <?php endif; ?> |
195 | | - |
196 | | - <?php if ($params->get('show_create_date')) : ?> |
197 | | - <dd> |
198 | | - <div class="create"> |
199 | | - <span class="icon-calendar-alt" aria-hidden="true"></span> |
200 | | - <time datetime="<?php echo HTMLHelper::_('date', $item->created, 'c'); ?>"> |
201 | | - <?php echo Text::sprintf('COM_CONTENT_CREATED_DATE_ON', HTMLHelper::_('date', $item->modified, Text::_('DATE_FORMAT_LC3'))); ?> |
202 | | - </time> |
203 | | - </div> |
204 | | - </dd> |
205 | | - <?php endif; ?> |
206 | | - <?php if ($params->get('show_modify_date')) : ?> |
207 | | - <dd> |
208 | | - <div class="modified"> |
209 | | - <span class="icon-calendar-alt" aria-hidden="true"></span> |
210 | | - <time datetime="<?php echo HTMLHelper::_('date', $item->modified, 'c'); ?>"> |
211 | | - <?php echo Text::sprintf('COM_CONTENT_LAST_UPDATED', HTMLHelper::_('date', $item->modified, Text::_('DATE_FORMAT_LC3'))); ?> |
212 | | - </time> |
213 | | - </div> |
214 | | - </dd> |
215 | | - <?php endif; ?> |
216 | | - <?php if ($params->get('show_hits')) : ?> |
217 | | - <dd> |
218 | | - <div class="hits"> |
219 | | - <span class="icon-eye"></span> |
220 | | - <meta content="UserPageVisits:<?php echo $item->hits; ?>"> |
221 | | - <?php echo Text::sprintf('COM_CONTENT_ARTICLE_HITS', $item->hits); ?> |
222 | | - </div> |
223 | | - </dd> |
224 | | - <?php endif; ?> |
225 | | - </dl> |
226 | | - </div> |
| 53 | + <?php echo LayoutHelper::render('joomla.content.info_block', ['item' => $item, 'params' => $params, 'position' => 'below']); ?> |
227 | 54 | <?php endif; ?> |
228 | 55 | <?php // Content is generated by content plugin event "onContentAfterDisplay" ?> |
229 | 56 | <?php echo $item->event->afterDisplayContent; ?> |
230 | | - </div> |
| 57 | + </div> |
231 | 58 | <?php endforeach; ?> |
232 | 59 | </div> |
233 | 60 | <div class="com-content-archive__navigation w-100"> |
|
0 commit comments