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

Make directories for widgets and modules


Reply

3 Posts   583 Views

Avatar
raamklaza

23 June 2009 at 12:46am Community Member, 182 Posts

Hello,

is there a way to hack widgets and modules directories in to the silverstripe installation?

If you have a lot if modules and widgets it will get very messy now.

Basically i want this layout:

assets
auth_openid
jsparty
mysite
sapphire
themes
tutorial
widgets
++ subfolder
modules
++ blog
++ cms
++ and so on

Avatar
CrazyCoders

23 June 2009 at 2:16am Community Member, 32 Posts

Did you try it out first before posting this question? I can't be sure, but my guess is that it can be done if you put a _config.php at the root of modules and then one at the root of widgets...

SS's /db/build looks for a folder with a _config.php file to continue scanning for files. I don't know what would happen though if you'd put another subfolder with another _config.php inside it...

Try it for yourself and tell us :)

Avatar
Willr

23 June 2009 at 8:50am Forum Moderator, 5511 Posts

raamklaza - yes you can nest widgets and modules in subfolders but you will have to watch the following points

- Path names might be hard coded to /blog/images or /blog/css so just do a find and replace over those
- _config files only work 1 level deep so you will need to bring all the _config settings from each module (say you now have /modules/blog/_config.php) will need to be in a generic modules/_config.php