Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How to change SS directory structure?

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: 1150 Views
  • shamil
    Avatar
    Community Member
    2 Posts

    How to change SS directory structure? Link to this post

    Hi,
    I'm wondering if is possible to change the directory structure of SS.
    If it is, where is the correct place to do the changes?

    Current structure:
    ./assets
    ./cms
    ./googlesitemaps
    ./jsparty
    ./mysite
    ./sapphire
    ./themes

    I want it to be like this:
    ./assets
    ./modules/cms
    ./modules/googlesitemaps
    ./modules/jsparty
    ./modules/all other modules will be put here
    ./mysite
    ./sapphire
    ./themes

    So basically what I want is to have all modules installed in ./modules/ directory instead of in the SS root directory.

    Thanks

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: How to change SS directory structure? Link to this post

    You can do that, All you would need to do is create a /modules/_config.php will all the combined information of module-name/_config.php files (as a _config tells SS to load this code, and it only loads it up 1 directory I believe) and then you would just need to edit the JS, Image and CSS paths in each module to point to the new location

  • shamil
    Avatar
    Community Member
    2 Posts

    Re: How to change SS directory structure? Link to this post

    It works. Thanks!
    I've created a "./modules/_config.php", that dynamically includes the "_config.php" files in all subfolders.

    1150 Views
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.