-
Notifications
You must be signed in to change notification settings - Fork 310
/
node_more_info.ctp
25 lines (22 loc) · 1 KB
/
node_more_info.ctp
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
<div class="node-more-info">
<?php
$type = $typesForLayout[$this->Nodes->field('type')];
if (!empty($this->Nodes->node->taxonomies)) {
echo __d('croogo', 'Posted in') . ' ' . implode(', ', $this->Nodes->nodeTermLinks());
}
if ($this->Nodes->commentsEnabled() && $this->request->params['action'] !== 'view' && $type->comment_status) {
if (isset($nodeTerms) && count($nodeTerms) > 0) {
echo ' | ';
}
$commentCount = '';
if ($this->Nodes->field('comment_count') == 0) {
$commentCount = __d('croogo', 'Leave a comment');
} elseif ($this->Nodes->field('comment_count') == 1) {
$commentCount = $this->Nodes->field('comment_count') . ' ' . __d('croogo', 'Comment');
} else {
$commentCount = $this->Nodes->field('comment_count') . ' ' . __d('croogo', 'Comments');
}
echo $this->Html->link($commentCount, array_merge($this->Nodes->field('url')->getUrl()), ['#' => 'comments']);
}
?>
</div>