Jump to:

10843 Posts in 2514 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Nested Module folders?

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 428 Views
  • dizzystuff
    Avatar
    Community Member
    93 Posts

    Nested Module folders? Link to this post

    Hey All, quick question - are there any untoward consequences of nesting modules? That is, placing several related modules into one folder in the project root?

    -- these_modules
    -- module_1
    - code
    - _config.php
    -- module_2
    - code
    - _config.php
    -- other_module_a
    -- other_module_b
    -- sapphire
    -- cms
    -- etc

    I've got a reason I'm happy with to consider doing this, so i'd rather not go into too much convo about the pros or cons - I'm just wondering if there would be consequences I haven't considered and would appreciate the advice.

    Cheers

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Nested Module folders? Link to this post

    I do this, there is an old thread where both Unclecheese adn Willr strongly disagreed with me - but I dind't listen and am actually happy with the way things have turned out.

    The problems are that

    1) many modules have hardcoded links expecting certain things in certain folders - these need updating
    2) the items in the _config.php need to be at the one up from root level to be interpreted properly
    3) both of the above mean upgrading is tough

    My view is that I am happy to do update hardcoded links for (1) and consolodate the (2) into one config and (3) I am happy to avoid because I only every do this for small modules (e.g. grouped CMS menus, various multi selects, etc). In a case like user form I do have the full module at root level.

    Hope this helps.

  • dizzystuff
    Avatar
    Community Member
    93 Posts

    Re: Nested Module folders? Link to this post

    Hey swaiba

    Thanks for your response - it's exactly what I was after. I'm only using this for a few small modules too and you've made the trade-offs very clear for me.

    Thanks!

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