CodeIgniter Forums
Two applications sharing the same layout (already programmed). Help! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Two applications sharing the same layout (already programmed). Help! (/thread-31582.html)



Two applications sharing the same layout (already programmed). Help! - El Forum - 06-24-2010

[eluser]Unknown[/eluser]
Hello everyone!

I really need your help, guys.
First of all, this is my Code Igniter structure:

- CodeIgnter_1.7.2
- system

- Intranet
- application

- Whatever
- application

"Intranet" is the main application and "Whatever" is one of the applications that will be called from the "Intranet". Both shares the same Code Igniter´s system folder.

The layout used by "Intranet" consists of a header, a "content" area and a footer. Here it is:

Code:
<html>
   <head>
      <title>{title}</title>
   </head>
   <body>
      <div id="header">
         <div id="menu"></div>
      </div>
      <div id="content">{content}</div>
      <div id="footer"></div>
   &lt;body&gt;
&lt;/html&gt;

The thing is, "Whatever" must use the same layout as "Intranet" which already ha everything programmed like menu, sessions, etc. However, we don´t want to use frames.

How can I do this?
I thought that maybe I could use a socket connection on "Whatever" application to get the "Intranet" layout already programmed but I don´t know if this is the best approach.

Any thoughts?

Thanks!


Two applications sharing the same layout (already programmed). Help! - El Forum - 06-29-2010

[eluser]Unknown[/eluser]
Anyone, please?

Thanks!


Two applications sharing the same layout (already programmed). Help! - El Forum - 06-29-2010

[eluser]Kamarg[/eluser]
Could you make your views folder in "Whatever" be a symlink to the views folder in "Intranet"? If so, you can load views from "Intranet" in your "Whatever" project like any other view.


Two applications sharing the same layout (already programmed). Help! - El Forum - 06-29-2010

[eluser]Buso[/eluser]
Try playing with $this->load->_ci_view_path. With this you could make your two apps fetch the layout from the same folder