[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"><?=$content?></div>
<div class="footer">...</div>
<body>
</html>
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:
<?php
$data = *selection from db or something like this*
$subview = $this->loadView('subview', $data);
$mainview = $this->loadView('mainview', $subview);
print $mainview;
?>
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!