Welcome Guest, Not a member yet? Register   Sign In
How to organize applications ?
#11

(This post was last modified: 05-21-2020, 07:37 AM by Zugmaschine.)

I have understand the way so far, to make simple Modules in CI4.
But how, when i want build Modules inside Modules.
Take a look:

Backend_Modul
   + Modul_A
   + Modul_B
Frondend_Modul
   + Modul_A
   + Modul_B

I can realize that in the same way, with Namespaces?
Reply
#12

Of course. Just name it;

Frontend\Module
Frontend\AnotherModule

Backend\Module
Backend\AnotherModule

Take a look at this, and just create multiple acme. Acme in this case are your frontend and backend. And Blog are Module_A and Module_B.
https://codeigniter.com/user_guide/general/modules.html
Reply
#13

To be safe use your own namespace name for your own company.

CompanyName
-- ModuleName
---- Controllers
---- etc;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#14

(05-21-2020, 08:40 AM)InsiteFX Wrote: To be safe use your own namespace name for your own company.

CompanyName
-- ModuleName
---- Controllers
---- etc;
You mean that way ...

CompanyName (my Namespace)
  +Backend_Modul
      + Modul_A
      + Modul_B
  +Frontdend_Modul
      + Modul_A
      + Modul_B


But i have also to build a namespace (subnamespace) for the Backend_Modul and the Frondend_Modul, or ...?
Reply
#15

Very interesting thread for a newbie like me! Following it and learning... Thank you all!!
Reply
#16

(This post was last modified: 05-22-2020, 09:56 AM by jreklund.)

(05-21-2020, 09:35 AM)Zugmaschine Wrote: But i have also to build a namespace (subnamespace) for the Backend_Modul and the Frondend_Modul, or ...?

Yes, all sub-folders are a new sub namespace.
Reply
#17

(This post was last modified: 12-02-2020, 07:49 PM by LefflerHirthe.)

This topic is really interesting. It is describing my problem properly. The comments above have given me a lot of ideas for organizing the dzwonki na telefon app
Reply
#18

Modules are one of the best things that have happened in the new CodeIgniter 4.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#19

Hello to all,

I'm creating a small personal cms with CI4, but I'm stuck on the organization of the template system.

My architecture, based on modules is the following:
- app
- public
-- assets
--- default-theme
---- style.css
---- js.css
- companyname
-- Admin
-- Blog
-- Catalog
-- Themes
--- default-theme
---- blog
----- template.php
----- post.php

So I have a "Themes" folder which will contain the different templates.

I would also like to know the best way to manage the CSS & JS files of the template (assets/default-theme) in the same folder as the Php files of the module (tcms/Themes/default-theme).

Thank you in advance for your help and happy holidays.
Reply
#20

(This post was last modified: 12-26-2020, 09:01 PM by John_Betong.)

@ MathCmsCode,

I created a Base_Controller which all the controllers extend. The Base_Controller detects the URI and sets a public $uri variable. This variable is checked (in a switch statement) and the relevant CSS and JavaScript files included in a common HTML Header file... which is included in all the views.

https://codeigniter.com/user_guide/exten...controller
Reply




Theme © iAndrew 2016 - Forum software by © MyBB