silverstripe-blog/templates/Layout/BlogEntry.ss
RuthAdele 88bb98785c Display count for approved comments only
also add in comment/comments depending on if there is only 1 comment.
2013-10-23 10:46:45 +10:30

23 lines
1.1 KiB
Scheme

<% include BlogSideBar %>
<div id="BlogContent" class="typography">
<% include BreadCrumbs %>
<div class="blogEntry">
<h2 class="postTitle">$Title</h2>
<p class="authorDate"><% _t('BlogEntry_ss.POSTEDBY', 'Posted by') %> $Author.XML <% _t('BlogEntry_ss.POSTEDON', 'on') %> $Date.Long | ApprovedComments.Count <% if ApprovedComments.Count = 1 %><% _t('BlogEntry_ss.COMMENT', 'Comment') %><% else %><% _t('BlogEntry_ss.COMMENTS', 'Comments') %><% end_if %></p>
<% if TagsCollection %>
<p class="tags">
<% _t('BlogEntry_ss.TAGS', 'Tags:') %>
<% loop TagsCollection %>
<a href="$Link" title="<% _t('BlogEntry_ss.VIEWALLPOSTTAGGED', 'View all posts tagged') %> '$Tag'" rel="tag">$Tag</a><% if not Last %>,<% end_if %>
<% end_loop %>
</p>
<% end_if %>
$Content
</div>
<% if IsOwner %><p class="edit-post"><a href="$EditURL" id="editpost" title="<% _t('BlogEntry_ss.EDITTHIS', 'Edit this post') %>"><% _t('BlogEntry_ss.EDITTHIS', 'Edit this post') %></a> | <a href="$Link(unpublishPost)" id="unpublishpost"><% _t('BlogEntry_ss.UNPUBLISHTHIS', 'Unpublish this post') %></a></p><% end_if %>
$PageComments
</div>