cms-niceties/templates/A2nt/CMSNiceties/Widgets/BlogAuthorsWidget.ss

14 lines
553 B
Scheme
Raw Normal View History

2024-01-22 21:56:44 +01:00
<% cached 'blogauthorswidget', $List('SilverStripe\Blog\Model\BlogPost').max('LastEdited'), $List('SilverStripe\Blog\Model\BlogPost').count() %>
2024-01-22 22:04:35 +01:00
<% if $Authors %>
<div class="blog-post__credits">
<% loop $Authors %>
<% if $URLSegment && not $Up.ProfilesDisabled %>
<a href="$URL" class="blog-post__credit">$Name.XML</a>
<% else %>
<span class="blog-post__credit">$Name.XML</span>
<% end_if %>
<% end_loop %>
</div>
<% end_if %>
2024-01-22 21:56:44 +01:00
<% end_cached %>