Welcome Guest, Not a member yet? Register   Sign In
view into view (like include)
#1

[eluser]Goyo[/eluser]
Hi,

my english is bad, but i hope you can understand me! im absolutly new in this framework and MVC model to. I actually develop website in php without framework and i decide to use CI. But i have a few "concept" problems. I really dont know how implemnet some thinks! for example, normally a index page structure are like this:

Code:
<html>
<head>
<title>Website</title>
</head>
<body>

<div id="header">
&lt;?php include("header.php") ?&gt;
</div>

<div id="main">
<p> the main content </p>
</div>

<div id="footer">
&lt;?php include("footer.php" ?&gt;
</div>

&lt;/body&gt;
&lt;/html&gt;

ok, for the example i keep it simple.

I wrote 3 controllers:
main.php -> to manage the entire page view
header.php -> to manage the header view
footer.php -> to manage te footer view

And his 3 views:
main_view.php
header_view.php
footer_view.php

I make it this way because the header has dinamyc content and i need to access to database.

my question is: how i include the header and footer views with his respective controllers?

I hope you understand my question and i know its a concept problem! thanks!


Messages In This Thread
view into view (like include) - by El Forum - 11-14-2008, 05:48 AM
view into view (like include) - by El Forum - 11-14-2008, 06:12 AM
view into view (like include) - by El Forum - 11-14-2008, 06:18 AM
view into view (like include) - by El Forum - 11-21-2008, 11:37 PM
view into view (like include) - by El Forum - 11-22-2008, 07:35 AM
view into view (like include) - by El Forum - 11-22-2008, 08:12 AM
view into view (like include) - by El Forum - 11-22-2008, 08:14 AM
view into view (like include) - by El Forum - 05-08-2009, 10:11 AM
view into view (like include) - by El Forum - 04-24-2011, 09:36 AM
view into view (like include) - by El Forum - 07-05-2011, 09:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB