hmmm ContentController is the place to add the code, I will try it out. thanks!!
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.
- Previous 10 entries
- 1
- Page 22(current)
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.
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.
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?
Cheers,
Mo
- Previous 10 entries
- 1
- Page 22(current)