23493 Posts in 19013 Topics by 2878 members
|Go to End|
29 October 2010 at 8:58am
I want to know if there is a way to ovewrite silverstripe Core classes, od tell the cms to use my classes.
if i put a core template in mysite/templates/TableListField.ss the cms will use my template
I want to achieve the same with the class it self eg : "MyTableListField extends TableListField" and tell the cms to use this class MyTableListField instead. or use the same technique as the DataObjectDecorator but I can't seem to find a way.
Any help would be appreciated.
Thank you very much
29 October 2010 at 10:19am
I really +1 this request, but its not possible. Tried this several times with Object::use_custom_class(); but this won't override code FormFields.
So if someones knows a solution
29 October 2010 at 12:27pm
Yeah, Object::use_custom_class only replaces objects created with Object::create. So, I guess we should be writing SS code using Object::create all the time, but no one does :/ so it is of limited use.
29 October 2010 at 1:46pm
This would make a lot of sense. I really hope for this feature to be implemented . It would really make the cms and the framework totally customizable whitout touching the core.
Just for the record it's possible to Subclass the ModelAdmin and Set a TableListClass with the resultsTableClassName proprety.
But it was tedious to find where to hook to change it.
By having the core written with Object::create it would actually be a charm.
|Go to Top|