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   610 Views

Avatar
raamklaza

Community Member, 182 Posts

23 June 2009 at 12:46am

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

Community Member, 32 Posts

23 June 2009 at 2:16am

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

Forum Moderator, 5513 Posts

23 June 2009 at 8:50am

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