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.

Template Questions /

Template folder structuring


Reply


2 Posts   328 Views

Avatar
Schippie

Community Member, 37 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, 37 Posts

9 June 2014 at 11:42pm

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