Jump to:

23481 Posts in 18965 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Module (Extension) directory ??

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: 544 Views
  • teejay
    Avatar
    Community Member
    63 Posts

    Module (Extension) directory ?? Link to this post

    Hello, just a short question. Is it possible to create a module directory where I can store all my extensions / modules rather than having everything in the root folder.

    Thx

    Thomas

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: Module (Extension) directory ?? Link to this post

    Yes you *could*, but you'll need to move all the content from your _config files into 1 _config file in /modules/_config.php. You might also have issues with CSS / image links in each module referencing /forums/css/* and any templates will need to be in your theme rather that the module file (since the template parser will only look for modulename/templates/.

    So rather an extensive task which will involve editing alot of files.

  • teejay
    Avatar
    Community Member
    63 Posts

    Re: Module (Extension) directory ?? Link to this post

    ok u have just convinced me not to do something like that

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Module (Extension) directory ?? Link to this post

    I would prefer such a thing as well, since the root folder can become quite cluttered when dealing with lots of modules.
    Maybe as an enhancement for a future version of SilverStripe?

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: Module (Extension) directory ?? Link to this post

    @banal - see http://groups.google.com/group/silverstripe-dev/browse_thread/thread/a27d7f0013c33537/ac2cf816ebfce960?lnk=gst&q=directory+structure#ac2cf816ebfce960 for a discussion the core devs had a while back about the structure. Most of that discussion is still relavent I think.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Module (Extension) directory ?? Link to this post

    here's a thought - your _config.php could scan sub dirs and include them automatically.. no need to move everything to one file.

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Module (Extension) directory ?? Link to this post

    @Willr thanks for that link. Sounds really interesting.
    Do you know if there's any progress on this, since the discussion is older than one year? Might not be top priority, but would be nice nevertheless.

    In the discussion they are also talking about symlinking one core to multiple projects. This works quite well already, even for modules (except for that damned Image.php class (afaik this is fixed in trunk, but not in 2.3.5)).

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: Module (Extension) directory ?? Link to this post

    banal - It won't be changed for 2.4, It may be changed for 2.5 but I don't know of anything planned. It will might come at a similar time we implement a module manager in the cms since that would be a good time to tackle it but no plans yet.

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