Welcome Guest, Not a member yet? Register   Sign In
"Main view"
#1

[eluser]donald.tbd[/eluser]
Hello,

Ive been working with php for some time now but i am new to CI and wanted to ask a little bit of guidance. Before CI i used my own framework and i like CI because it reminds me a little bit of my own.

In my own framework i had a static frame, that i called "main view". It looked a bit like this:

<html>
<head>
...
</head>
<body>
<div class="header">...</div>
<div class="menu">...</div>
<div class="menu">&lt;?=$content?&gt;</div>
<div class="footer">...</div>
&lt;body&gt;
&lt;/html&gt;

Now everything in this view is pretty much static except the $content part. $content was the dynamic part and it was basicly another "subview" passed down to this "main view". "Subview" could just be a table of dynamic content witohut anything else" The point of this "main view" was ofcorse not to write every static part again and again.
It could be used like this:

&lt;?php
$data = *selection from db or something like this*
$subview = $this->loadView('subview', $data);
$mainview = $this->loadView('mainview', $subview);
print $mainview;
?&gt;

Now ive been looking around but cant seem to find how can i accomplish something similar in CI.
I
would be thankful for any advice! Smile


Messages In This Thread
"Main view" - by El Forum - 05-06-2011, 01:34 PM
"Main view" - by El Forum - 05-06-2011, 11:40 PM
"Main view" - by El Forum - 05-07-2011, 12:26 PM
"Main view" - by El Forum - 05-14-2011, 06:36 PM
"Main view" - by El Forum - 05-14-2011, 11:50 PM
"Main view" - by El Forum - 05-15-2011, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB