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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

How to change SS directory structure?


Go to End


3 Posts   1847 Views

Avatar
shamil

Community Member, 2 Posts

15 May 2009 at 11:00am

Edited: 15/05/2009 11:04am

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

Avatar
Willr

Forum Moderator, 5523 Posts

15 May 2009 at 11:57am

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

Avatar
shamil

Community Member, 2 Posts

15 May 2009 at 8:45pm

Edited: 15/05/2009 8:46pm

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