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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

Render Custom template

Go to End

12 Posts   3474 Views


Community Member, 8 Posts

15 April 2014 at 11:33am

hmmm ContentController is the place to add the code, I will try it out. thanks!!


Forum Moderator, 267 Posts

15 April 2014 at 11:59am

Ideally you don't want to hack the core...

as I say, if you are trying to add this functionality to all Page Controllers then you could define it in the Page.php in the Page_Controller.
My example is is more if you are using a custom controller and routing (i.e. not a Page on the Site Tree).

Page_Controller inherits from ContentController.


Forum Moderator, 267 Posts

18 April 2014 at 3:48pm

Let me know how you got on RD, if if this helped to solve your problem can you post some information about what you ended up doing to make this thread useful for others. :) thanks.


Community Member, 541 Posts

29 April 2014 at 10:51am

Hi both,

Wouldn't it make more sense to add the code that sets the template name in an extension of controller (or content controller).

That way the template will be available globally?



Go to Top