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

Mysite and Themes folders

Go to End

4 Posts   859 Views


Community Member, 541 Posts

2 June 2009 at 9:52pm

I imagine I will be told to stop being fussy about this, but I was thinking, wouldn't it make more sense for the "themes" folder to be within the project folder rather than being independent? That way all the project specific code (both server and client) would be wrapped up in a single folder in your webroot.

Its just a niggling thing that bugs me, but I thought I would share it.




Community Member, 904 Posts

3 June 2009 at 12:09am

Well.. One could also argue if a Module belongs into the "Project" folder by the same logic.
Themes aren' t project specific code in my book. They are like modules, but instead of providing functionality, they provide a certain look. And most importantly: They are interchangeable (or should be) for different projects.
If you don't like the themes folder, you can still create custom templates for your project in the "templates" folder and delete the themes folder (that's what I usually do, since most of the Sites I create have an unique look and aren't meant to be themed).

I think the current themes solution is just fine. In fact, I'd like to see something similar for modules. A "modules" folder, where one would put all the different modules. That would keep the webroot nice and tidy.
Something like:

  +-- cms
  +-- moduleA
  +-- moduleB
  +-- themeX
  +-- themeY
  +-- themeZ


Community Member, 145 Posts

3 June 2009 at 2:20am

You can put template/css/js files within the mysite folder. Checkout these two pages in the wiki: directory structure and themes:developing.


Community Member, 541 Posts

3 June 2009 at 4:51am

Adam, I was aware you could do this, haven't tried it yet though. As far as I am aware, the developers would prefer us to use the themes folder.

Banal, I agree with you on the modules folder. It would be very useful if you are using a larger site that utilizes a lot of different modules, making it easier to navigate to site specific files and literally getting your modules out of site.