Jump to:

1856 Posts in 1610 Topics by 562 members

Blog Module

SilverStripe Forums » Blog Module » Extending BlogHolder and BlogEntry

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1307 Views
  • qlex
    Community Member
    68 Posts

    Extending BlogHolder and BlogEntry Link to this post

    I have been extending blogholder and blogentry in order to allow customgroups edit only blogentires in CMS.

    To do that, I have modified in /blog/code/BlogHolder.php:

    class BlogHolder extends BlogTree


    class BlogHolder extends BlogTree implements PermissionProvider

    and added to the blogholder class:

    function canCreate() {
          return Permission::check("CUSTOMGROUP");
       function canDelete() {
          return Permission::check("CUSTOMGROUP");
       function canEdit() {
          return Permission::check("CUSTOMGROUP");

    Now, I would like to make this change blog-module-upgrade save - meaning, move this to /mysite/code/

    I already have there a BlogHolderDecorator which extends the Sitetree by adding some tabs to menu.

    Could anyone suggest me how should i do that? I think I should create a new BlogHolder.php within /mysite/code/ but what should be in it ?

    Thanx for a possibly quick reaction, as site for client is already up and I would like to protect the changes to BlogHolder before a future upgrade.


  • fanjade
    Community Member
    1 Post

    Re: Extending BlogHolder and BlogEntry Link to this post


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.