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.

Customising the CMS

Why does the controller automatically call the function getTemplate() if it exists?


Reply

686 Views

Avatar
MarcusDalgren

20 July 2009 at 3:08pm Community Member, 288 Posts

Hello.

Today I wrote a function in one of my controllers so I could do some template related testing. I called my function getTemplate and went about my business. However when I returned to my controllers base action I was very surprised to discover that the method getTemplate() gets run as well.

I tried searching the docs and I searched the forums, no hits. Is this some special reserved method that isn't documented or is this a bug? I searched in the core classes and only Email has a getTemplate method.