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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

How to make overloading method __call available in templates?


Go to End


1346 Views

Avatar
ordinarywebguy

Community Member, 13 Posts

27 January 2011 at 7:15pm

For example:

class My_Controller extends Page_Controller {

public function __call($name, $arguments) {

//return custom __call

//or

// return parent::__call($name, $arguments);

}

}

The overloaded method call is unable to parse and get the value in the template. Are there any workaround on that other than defining methods manually?