We are doing something very close from what you call submodules by using
static path.
Make routes like this in routes.ini
routes.submodule1.route = "submodule1/:module/:controller/:action/*"
routes.submodule2.route = "submodule2/:module/:controller/:action/*"
Then in bootstrap, with frontcontroller, you add all module dirs
// For regulars modules path
$frontController->addModuleDirectory('controllers/modules');
For 'submodules' path
$frontController->addModuleDirectory('controllers/submodule1');
$frontController->addModuleDirectory('controllers/submodule2');
Daniel Tangermann a écrit :
unbelievable that noone ever needed a modularsystem with more than one
subsection. Or is it just to easy that I do not see the solution?
Daniel Tangermann schrieb:
I finally have a working modular system together with smarty and
maintemplates.
My file-structure is:
/application
/modules
/foo1
/controllers
IndexController.php
/foo2
/controllers
IndexController.php
/views
/scripts
/foo1
footemplate1.tpl
/foo2
footemplate2.tpl
maintemplate.tpl
I know that in every module there should be a views folder for the
subtemplates, but this will not work for me together with the smarty
+ maintemplate solution, but this is ok for me right now.
I set up the module-dir in the bootstrap with:
$controller->addModuleDirectory('./application/modules').
Working fine for now, but what do I have to do to have some of the
modules having seperate modules like
/application
/modules
/submodule1
/foo1
/controllers
/foo2
/controllers
/modulewithoutsubs
/controllers
Maybe you can give me a hint.
Daniel
--
---------------------------------------------------------------------
Sorry, This disclamer is auto added by my company's FW
---------------------------------------------------------------------
Si vous n'etes pas destinataires de ce message, merci d'avertir l'expediteur de
l'erreur de distribution et de le detruire immediatement.
Ce message contient des informations confidentielles ou appartenant a La
Francaise des Jeux. Il est etabli a l'intention exclusive de ses destinataires.
Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle)
de ce message ou des informations qu'il contient, doit etre prealablement
autorisee.
Tout message electronique est susceptible d'alteration et son integrite ne peut
etre assuree. La Francaise des Jeux decline toute responsabilite au titre de ce
message s'il a ete modifie ou falsifie.
If you are not the intended recipient of this e-mail, please notify the sender
of the wrong delivery and delete it immediately from your system.
This e-mail contains confidential information or information belonging to La
Francaise des Jeux and is intended solely for the addressees. The unauthorised
disclosure, use, dissemination or copying (either whole or partial) of this
e-mail, or any information it contains, is prohibited.
E-mails are susceptible to alteration and their integrity cannot be guaranteed.
La Francaise des Jeux shall not be liable for this e-mail if modified or
falsified.