Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » add method to core class

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

Page: 1 2
Go to End
Author Topic: 2206 Views
  • chrisdarl
    Community Member
    33 Posts

    Re: add method to core class Link to this post

    That worked perfectly. Thank you!

    Here's the code I used if it helps anyone else..


    public static $has_one = array(
       "TopImage" => "Image"

    class MyImage extends DataObjectDecorator {
       public function GenerateTitle() {
          return "abc";

    DataObject::add_extension('Image', 'MyImage');

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