Nested modules with the same name

Hi all,

in our application we want addon-modules to carry their backend inside of a nested-module.

So every addon-module with a backend would have a module called ‘backend’.




addonModule1

	controllers

	modules

		backend

			controllers

			views

	views

addonModule2

	controllers

	modules

		backend

			controllers

			views

	views



In the documentation is written: "A module is organized as a directory whose name serves as its unique ID."

We tried it anyhow and it seems to work, even though there are multiple modules called ‘backend’.

Does anybody know about any side-effects, when having multiple modules with the same name?

Or isn’t the unique ID mandatory for nested modules?

Thanks, Florian.

One side effect you should be aware of:

So you will probably not be able to use any root alias defined for your modules.

I’ve been using exactly the same structure you mentioned in a little cms and have no issues till now.

I think this is a good and flexible structure because you can easily include and exclude modules for your clients’ projects depending on their needs. Also, I’ve created a theme called “Backend”, which is shared by backend submodules and created widgets in modules for flexibiliby in the frontend

It’s not finished yet, but it has been working fine

regards!