21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1464 Views |
-
Decorating a controller

1 April 2010 at 4:29pm
what's the best way to decorate a page_controller so that i can add another allowed_action?
ultimately, i'm building a widget for the blog that needs to use a new action on blogholder (like the tag cloud does), but whenever i decorate page_controller, it says i cant do that because page_controller doesnt extend DataObject. i dont want to hack the blog module for upgrade reasons.
Any advice would be awesome.
thanks!
-Chris -
Re: Decorating a controller

12 November 2010 at 7:01am
did you ever figure this out?
I am trying to make my first module, and want to have site wide methods available via the page_controller but want my code contained in my module.. -
Re: Decorating a controller

12 November 2010 at 10:32am
class MySiteWideControllerMethods extends Extension{
//Page_Controller = $this->owner
}//config.php
Object::add_extension('Page_Controller','MySiteWideControllerMethods');
| 1464 Views | ||
|
Page:
1
|
Go to Top |



