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.

Customising the CMS /

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

Function called twice int the controller


Go to End


936 Views

Avatar
Sultan

Community Member, 8 Posts

23 April 2013 at 11:02pm

My function which i have included in the class Page_Controller extends ContentController {
function myfunction{
// contents
}
}
is called twice if i try to call it from the template.

That is in Page.ss if i try to call the function $myfunction then the function return value increments with two..