Jump to:

23481 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Mysite and Themes folders

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

Page: 1
Go to End
Author Topic: 618 Views
  • Mo
    Community Member
    508 Posts

    Mysite and Themes folders Link to this post

    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.



  • banal
    Community Member
    901 Posts

    Re: Mysite and Themes folders Link to this post

    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

  • AdamJ
    Community Member
    145 Posts

    Re: Mysite and Themes folders Link to this post

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

  • Mo
    Community Member
    508 Posts

    Re: Mysite and Themes folders Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.