mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: Got rid of link to post new entry in the front end on a BlogTree (method does not exist on BlogTree).
Thanks smurkas (#4692)
This commit is contained in:
parent
d75c402999
commit
9cfd303ecf
@ -60,7 +60,7 @@ class BlogManagementWidget_Controller extends Widget_Controller {
|
|||||||
|
|
||||||
function PostLink() {
|
function PostLink() {
|
||||||
$container = BlogTree::current();
|
$container = BlogTree::current();
|
||||||
if ($container) return $container->Link('post');
|
return ($container && $container->ClassName != "BlogTree") ? $container->Link('post') : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="$PostLink"><% _t('POSTNEW', 'Post a new blog entry') %></a></li>
|
<% if PostLink %><li><a href="$PostLink"><% _t('POSTNEW', 'Post a new blog entry') %></a></li><% end_if %>
|
||||||
<% if CommentLink %><li><a href="$CommentLink">$CommentText</a></li><% end_if %>
|
<% if CommentLink %><li><a href="$CommentLink">$CommentText</a></li><% end_if %>
|
||||||
<li><a href="Security/logout"><% _t('LOGOUT', 'Logout') %></a></li>
|
<li><a href="Security/logout"><% _t('LOGOUT', 'Logout') %></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user