-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
block.php
76 lines (62 loc) · 2.63 KB
/
block.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
$blockPosition = $displayData['params']->get('info_block_position', 0);
?>
<dl class="article-info muted">
<?php if ($displayData['position'] == 'above' && ($blockPosition == 0 || $blockPosition == 2)
|| $displayData['position'] == 'below' && ($blockPosition == 1)
) : ?>
<dt class="article-info-term">
<?php // TODO: implement info_block_show_title param to hide article info title ?>
<?php if ($displayData['params']->get('info_block_show_title', 1)) : ?>
<?php echo JText::_('COM_CONTENT_ARTICLE_INFO'); ?>
<?php endif; ?>
</dt>
<?php if ($displayData['params']->get('show_author') && !empty($displayData['item']->author )) : ?>
<dd class="createdby" itemprop="author" itemscope itemtype="http://schema.org/Person">
<?php echo JLayoutHelper::render('joomla.content.info_block.author', $displayData); ?>
</dd>
<?php endif; ?>
<?php if ($displayData['params']->get('show_parent_category') && !empty($displayData['item']->parent_slug)) : ?>
<dd class="parent-category-name">
<?php echo JLayoutHelper::render('joomla.content.info_block.parent_category', $displayData); ?>
</dd>
<?php endif; ?>
<?php if ($displayData['params']->get('show_category')) : ?>
<dd class="category-name">
<?php echo JLayoutHelper::render('joomla.content.info_block.category', $displayData); ?>
</dd>
<?php endif; ?>
<?php if ($displayData['params']->get('show_publish_date')) : ?>
<dd class="published">
<?php echo JLayoutHelper::render('joomla.content.info_block.publish_date', $displayData); ?>
</dd>
<?php endif; ?>
<?php endif; ?>
<?php if ($displayData['position'] == 'above' && ($blockPosition == 0)
|| $displayData['position'] == 'below' && ($blockPosition == 1 || $blockPosition == 2)
) : ?>
<?php if ($displayData['params']->get('show_create_date')) : ?>
<dd class="create">
<?php echo JLayoutHelper::render('joomla.content.info_block.create_date', $displayData); ?>
</dd>
<?php endif; ?>
<?php if ($displayData['params']->get('show_modify_date')) : ?>
<dd class="modified">
<?php echo JLayoutHelper::render('joomla.content.info_block.modify_date', $displayData); ?>
</dd>
<?php endif; ?>
<?php if ($displayData['params']->get('show_hits')) : ?>
<dd class="hits">
<?php echo JLayoutHelper::render('joomla.content.info_block.hits', $displayData); ?>
</dd>
<?php endif; ?>
<?php endif; ?>
</dl>