mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
API CHANGE Changed BlogEntry->Tags() to TagsCollection() to avoid confusion with the property "Tags" which is of DBField type "Text" (not DataObjectSet) - necessary to adjust to changed DataObject-write() behaviour of using DBField instances to write the value (rather than directly editing the SQL manipulation). See r52927 for details.
This commit is contained in:
parent
0f0e473c7f
commit
359446212a
@ -83,7 +83,7 @@ class BlogEntry extends Page {
|
|||||||
/**
|
/**
|
||||||
* Returns the tags added to this blog entry
|
* Returns the tags added to this blog entry
|
||||||
*/
|
*/
|
||||||
function Tags() {
|
function TagsCollection() {
|
||||||
$theseTags = split(" *, *", trim($this->Tags));
|
$theseTags = split(" *, *", trim($this->Tags));
|
||||||
|
|
||||||
$output = new DataObjectSet();
|
$output = new DataObjectSet();
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<div class="blogSummary">
|
<div class="blogSummary">
|
||||||
<h2><a href="$Link" title="<% _t('VIEWFULL', 'View full post titled -') %> '$Title'">$MenuTitle</a></h2>
|
<h2><a href="$Link" title="<% _t('VIEWFULL', 'View full post titled -') %> '$Title'">$MenuTitle</a></h2>
|
||||||
<p class="authorDate"><% _t('POSTEDBY') %> $Author.XML <% _t('POSTEDON', 'on') %> $Date.Long | <a href="$Link#PageComments_holder" title="View Comments Posted">$Comments.Count <% _t('COMMENTS', 'Comments') %></a></p>
|
<p class="authorDate"><% _t('POSTEDBY') %> $Author.XML <% _t('POSTEDON', 'on') %> $Date.Long | <a href="$Link#PageComments_holder" title="View Comments Posted">$Comments.Count <% _t('COMMENTS', 'Comments') %></a></p>
|
||||||
<% if Tags %>
|
<% if TagsCollection %>
|
||||||
<p class="tags">
|
<p class="tags">
|
||||||
Tags:
|
Tags:
|
||||||
<% control Tags %>
|
<% control TagsCollection %>
|
||||||
<a href="$Link" title="View all posts tagged '$Tag'" rel="tag">$Tag</a><% if Last %><% else %>,<% end_if %>
|
<a href="$Link" title="View all posts tagged '$Tag'" rel="tag">$Tag</a><% if Last %><% else %>,<% end_if %>
|
||||||
<% end_control %>
|
<% end_control %>
|
||||||
</p>
|
</p>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<div class="blogEntry">
|
<div class="blogEntry">
|
||||||
<h2>$Title</h2>
|
<h2>$Title</h2>
|
||||||
<p class="authorDate"><% _t('POSTEDBY', 'Posted by') %> $Author.XML <% _t('POSTEDON', 'on') %> $Date.Long | $Comments.Count <% _t('COMMENTS', 'Comments') %></p>
|
<p class="authorDate"><% _t('POSTEDBY', 'Posted by') %> $Author.XML <% _t('POSTEDON', 'on') %> $Date.Long | $Comments.Count <% _t('COMMENTS', 'Comments') %></p>
|
||||||
<% if Tags %>
|
<% if TagsCollection %>
|
||||||
<p class="tags">
|
<p class="tags">
|
||||||
<% _t('TAGS', 'Tags:') %>
|
<% _t('TAGS', 'Tags:') %>
|
||||||
<% control Tags %>
|
<% control TagsCollection %>
|
||||||
<a href="$Link" title="<% _t('VIEWALLPOSTTAGGED', 'View all posts tagged') %> '$Tag'" rel="tag">$Tag</a><% if Last %><% else %>,<% end_if %>
|
<a href="$Link" title="<% _t('VIEWALLPOSTTAGGED', 'View all posts tagged') %> '$Tag'" rel="tag">$Tag</a><% if Last %><% else %>,<% end_if %>
|
||||||
<% end_control %>
|
<% end_control %>
|
||||||
</p>
|
</p>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<p class="tagcloud">
|
<p class="tagcloud">
|
||||||
<% control Tags %>
|
<% control TagsCollection %>
|
||||||
<a href="$Link" class="$Class">$Tag</a>
|
<a href="$Link" class="$Class">$Tag</a>
|
||||||
<% end_control %>
|
<% end_control %>
|
||||||
</p>
|
</p>
|
Loading…
Reference in New Issue
Block a user