How to make new module/include custom page


#1

Hi to all,

Ive have made a small custom module/standalone page that pulls clients from db and populate table with an option to generate pdf in size of envelope with company data and client data (uses mpdf also).

Now, my idea is to integrate this into IP as sub page available from dashboard, or include some code so its not browseable for non-logged users (to use the same authentication system as IP).

Can somebody with a bit more knowledge in php and IP code help me whit this?

Thanks


#2

From your description, it is unclear to me what your module does (maybe a screenshot may help) so I cannot say where I would include it in the IP menu, but that’s not needed at this stage.

Does your module follow the model-controller-view design pattern?

If it does and if your code files are in the folder tree structure imposed by CodeIgniter framework, then it should be rather easy to integrate it into IP1.


#3

Start by looking at the modules directory. Choose the simplest one (for example the product or category).

Add the function to your modules controller and create models and views as required. As miquel suggested, you just need to conform to the Code Igniter framework, and you should be ok.

You can call your controller function in the following way

http://domain.com/index.php/yourmodule/youraction/arguement1/arguement1/arguement_n


#4

I must say It is a good suggestion.