Jump to:

5453 Posts in 1674 Topics by 1198 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Why does the controller automatically call the function getTemplate() if it exists?

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

Page: 1
Go to End
Author Topic: 638 Views
  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Why does the controller automatically call the function getTemplate() if it exists? Link to this post

    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.

    638 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.