Jump to:

23481 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Make directories for widgets and modules

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: 574 Views
  • raamklaza
    Avatar
    Community Member
    182 Posts

    Make directories for widgets and modules Link to this post

    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

  • CrazyCoders
    Avatar
    Community Member
    32 Posts

    Re: Make directories for widgets and modules Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: Make directories for widgets and modules Link to this post

    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

    574 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.