Jump to:

22977 Posts in 11806 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » SS3 - Requirements - Custom frontend methods...

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

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

Page: 1
Go to End
Author Topic: 262 Views
  • fyrebase
    Avatar
    Community Member
    7 Posts

    SS3 - Requirements - Custom frontend methods... Link to this post

    I would like to add some custom methods to Requirements for use in templates without hacking into the original Requirements.php source.

    For example:

    <% require mymethod(...) %>

    It is easy enough to extend the Requirements backend but not so much the frontend. Any help is much appreciated.

  • fyrebase
    Avatar
    Community Member
    7 Posts

    Re: SS3 - Requirements - Custom frontend methods... Link to this post

    The best solution I came up with was to rename Requirements to Requirements_Frontend and call my custom frontend class Requirements and have it extend Requirements_Frontend. This way only a minimal code change is required in the original source.

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