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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

multiple DataExtensions on one class?

Go to End

3 Posts   741 Views


Community Member, 244 Posts

11 March 2013 at 11:18am

Hi, I've a script exteding the main page class

class CustomExtention extends DataExtension { }
Object::add_extension('Page', 'CustomExtention ');

All good, however, on a site where there is another module already extending the 'Page' class, this 2nd extension doesn't seem to be picked up

Is it only possible to have one dataextension on any one class? If that's true, is there any kind of work around?


Forum Moderator, 5523 Posts

11 March 2013 at 10:41pm

You can have as many extensions on a class as you want. Make sure you have an add_extension() call for each of the extensions. You'll need to flush=1 when you add a new class to get it added to the manifest.


Community Member, 244 Posts

14 March 2013 at 4:50pm

cool, seems to work now using to add some content into the header...

public function contentcontrollerInit($controller) { }