Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » Extending Blog Entries - Best Way?

Discuss the Blog Module.

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

Page: 1 2 3
Go to End
Author Topic: 3077 Views
  • ChrisBryer
    Avatar
    Community Member
    95 Posts

    Re: Extending Blog Entries - Best Way? Link to this post

    I need to add another allowed_action to my BlogHolder_Controller.. i try to use Object::useCustomClass('BlogHolder_Controller','BlogHolderControllerExtender') and i get the error

    "Action 'showCategory' isn't allowed on class BlogHolder_Controller"

    BlogHolderControllerExtender extends BlogHolder_Controller. can anyone tell me the right way to do this?

    thanks,
    -Chris

  • Tyler
    Avatar
    Community Member
    2 Posts

    Re: Extending Blog Entries - Best Way? Link to this post

    I know this thread is old *March 9, 2010* but I figured it might help if I share what worked for me.

    @ChrisBryer You probably eventually figured it out, but it looks like you used:

    Object::useCustomClass('BlogHolder_Controller','BlogHolderControllerExtender')

    When instead you should have used:

    Object::add_extension('BlogHolder_Controller', 'BlogHolderControllerExtender');

    I did that and it works for me. Hope that helps someone

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Extending Blog Entries - Best Way? Link to this post

    Have you see if there are spaces at the end of config?

    3077 Views
Page: 1 2 3
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.