php - How can combine different pages in codeigniter? -


Assume that I separate my page into four parts. There is a banner, a login, one is main, the second footer is the banner and footer is fixed, this change will not happen. And the login is based on the different user's rights or login status, in the end the main is based on many things to do this. Therefore, I have 4 parts of the element:

  http: // localhost: 8888 / my_app / index.php / static_page / banner http: // localhost: 8888 / my_app / index.php / Static_page / footer http: // localhost: 8888 / my_app / index.php / user / login_fragment http: // local host: 8888 / my_app / index.php / system / main_fragment   

But the user only sees one page, but it connects all the employees ... So, instead of putting the iframe together, how can I separate logic from these pages, but can I combine a scene? Thank you.

I want to share what I have done. Although not an original idea (I do not remember where I got it), hope it will help you. I have an 'include' [application / view / include] folder, which contains the following files:

Footer. Header.php, Navigation. Php and template.php

Now the code in the template.fpp is in the form of the following:

  $ this-> load-> gt; View ('include / header'); $ This- & gt; Load-> View ($ main_content); $ This- & gt; Load-> View ('also includes / footer'); For use, I give you an example:  
  $ data = array ('page_title' = & gt; 'user listing', 'title' = & gt; user listing ', 'Main content' = & gt; 'user / scholist',); $ This- & gt; Load-> View ('/ template', $ data included)); $ Data array elements will be available in view [App / View / User / Scholist. FIF] $ page_ title, $ title etc. You can send an array or even HTML content   

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -