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.

All other Modules /

Discuss all other Modules here.

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

Nested Module folders?

Go to End

3 Posts   991 Views


Community Member, 94 Posts

8 March 2012 at 2:17pm

Edited: 09/03/2012 7:24am

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.



Forum Moderator, 1899 Posts

9 March 2012 at 7:28am

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.


Community Member, 94 Posts

7 April 2012 at 1:37pm

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.