[eluser]Bart v B[/eluser]
What you can do is create a constructor:
Code:
<?php
class someting extends CI_Controller
{
private = $nav;
function __construct()
{
parent::__construct();
$this->nav = array(
array('Home', site_url('home')),
array('Guestbook', site_url('guestbook')),
array('portfolio', site_url('portfolio'))
);
}
public function index()
{
$this->load->vars(array('NavigationArray' => $this->nav));
$this->load->view('some_view');
}
}
some_view.php
Code:
<div>
<?php foreach($NavigationArray as $entry): ?>
<a href="<?php echo $entry[1];?>"><?php echo $entry[0];?></a> |
<?php endforeach; ?>
</div>
In this way you don't have to create controllers.
Menu's, sidebars are a part of presentation, so it have to be in the view.

Remember my first words:
Quote:-> The controller controles things.
-> The model does the things.
-> The view is for presentation.