[eluser]ELRafael[/eluser]
[quote author="lane4" date="1257561261"]Pass a variable named sidebar to your view:
Code:
// ...
$data['sidebar'] = 'mysidebar';
$this->load->view('page',$data);
In your page view:
Code:
<?php if ($sidebar) $this->load->view($sidebar); ?>
So you can tell your page views which sidebar to load, or not.[/quote]
be carefull with this.
if you don't set $data['sidebar'] in your controller, when you try to call a non-defined var in your view, maybe php shows a warning.
imo
In you page view
Code:
<?php echo (isset($sidebar)) ? $sidebar : ''; ?>