Welcome Guest, Not a member yet? Register   Sign In
site inside enclosing html
#2

[eluser]Pedro Luz[/eluser]
i dont know if i did understand want you want

but you can use a kind of template

Code:
// the view that you want to load
$data["main_content"] = "/foobar_list";

// load the template base and pass the data
$this->load->view("/tpl/template_base", $data);

in the view, the /tpl/template_base.php
Code:
<div class="main-content">
&lt;?php
// loads a view if the $main_content is passed
isset($main_content) ? $this->load->view($main_content) : "";
?&gt;
</div>

and you can do this for has many views as you want
just pass

Code:
$data['navigation'] = 'views/navigation';
$data['banners'] = 'views/banners';
$this->load->view('template_base', $data);

this way you can send multiple views to the template


Messages In This Thread
site inside enclosing html - by El Forum - 02-11-2011, 04:25 AM
site inside enclosing html - by El Forum - 02-11-2011, 05:58 AM
site inside enclosing html - by El Forum - 02-11-2011, 06:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB