Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

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

Extending Blog Entries - Best Way?


Go to End


19 Posts   6442 Views

Avatar
ChrisBryer

Community Member, 95 Posts

9 March 2010 at 8:30pm

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

Avatar
Tyler

Community Member, 3 Posts

10 August 2010 at 6:04am

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 :)

Avatar
biapar

Forum Moderator, 435 Posts

15 August 2010 at 9:01pm

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

Go to Top