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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Mysite and Themes folders


Reply

4 Posts   625 Views

Avatar
Mo

2 June 2009 at 9:52pm Community Member, 509 Posts

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.

Cheers,

Mo

Avatar
banal

3 June 2009 at 12:09am Community Member, 901 Posts

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:

assets
jsparty
modules
+-- cms
+-- moduleA
+-- moduleB
mysite
sapphire
themes
+-- themeX
+-- themeY
+-- themeZ

Avatar
AdamJ

3 June 2009 at 2:20am Community Member, 145 Posts

You can put template/css/js files within the mysite folder. Checkout these two pages in the wiki: [url=http://doc.silverstripe.org/doku.php?id=directory-structure&s=structure]directory structure[/url] and [url=http://doc.silverstripe.org/doku.php?id=themes:developing]themes:developing[/url].

Avatar
Mo

3 June 2009 at 4:51am Community Member, 509 Posts

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.