Multiple applications in the same program as in the encoder use the same window layout menu

I am using one codeigniter installation to host 2 apps. But my problem is to use the same menu at the top of the page for both apps. With my actual file structure, I have no idea how to have the same title or menu for both applications. Here is my actual structure:

system
application
--base_loisirs (folder application of base loisirs)
base_loisir.php (with $application_folder = 'application/base_loisirs';)
--parc_auto (folder application of parc auto)
parc_auto.php (with $application_folder = 'application/parc_auto';)

      

Folder app contains all folders with different folders. Is it possible for me in a basic loisir view, for example to include a layout included in a paired auto folder, or vice versa? How?

+3


source to share


1 answer


Create one menu.php in root folder

Now create one directory name " common " in the view folder in both applications

/application
 /view
  /common ( new directory )

      

Now create another menu.php in the shared directory and put the following code



require($_SERVER['DOCUMENT_ROOT'].'/menu.php');

      

Now load the menu to any file using the following code

<?php echo $this->load->view('common/menu', '', TRUE);?>

      

+2


source







All Articles