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.

Template Questions /

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

Template folder structuring


Go to End


2 Posts   1532 Views

Avatar
Schippie

Community Member, 38 Posts

24 May 2014 at 3:05am

I have been wondering for a while (after having done a couple of silverstripe based projects) if their is anyway to restructure the template folder? Currently everything has to be in includes / layout / content (?) or just in the rood of the template folder. I get the reasoning behind this yet i also find it highly annoying when you deal with numerous templates.
The structure that i normally try to make for example in the controllers is as follows:

/controller/url/(all the controllers associated with this url part) example:

/controller/team/NewTeam.php
/controller/team/EditTeam.php
/controller/team/TeamInfo.php

etc.

I would like to be able to do something similar to the templates like:

/templates/url/includes *.ss
/templates/url/layout/ *.ss

This in my opinion would really tidy up the template folder. But i am not sure the current templating system would really allow for something like this. Seeing how fixed the structure seems.

Avatar
Schippie

Community Member, 38 Posts

9 June 2014 at 11:42pm

Guess that means their is currently no way to achieve this? Without modifying a lot of stuff?