[eluser]jedd[/eluser]
[quote author="MEM" date="1257030479"]
Question:
Is it like this, that the data workflow will work in that case?
[/quote]
Yup - it really is that simple.
Code:
// controller
function seccao ($thing = 'foo') {
if ($thing == 'foo')
// ... handle default case of no ID being passed
$data['parent'] = $this->Yourmodel->get_parent($thing);
$data['children'] = $this->Yourmodel->get_children($thing);
$this->load->view('generate_menu', $data);
}
Filling in the details is left as an exercise for the reader