[eluser]mrtopher[/eluser]
I tend to use more of a layout approach. So instead of having three or four templates which I load in and around my content line by line, I have a layouts folder in the views folder which has the overall look and feel and I simply load individual views in those layouts.
For example:
Code:
$page_data = array(
'some_content' => 'some content'
);
$temp_data = array(
'page_title' => 'Some title',
'left_column' => $this->load->view('navigation',0,TRUE),
'right_column' => $this->load->view('form',$page_data,TRUE)
);
$this->load->view('layouts/page_layout',$temp_data);
In regards to your validation question, I don't redirect the users. I simply make a call to the form display function from within the process function.
For example:
Code:
function display_form()
{
// display form.
}
function process_form()
{
$this->load->library('validation');
// validation rules
if($this->validation->run() == FALSE) {
$this->display_form(); // displays form and still have access to post data.
}
else {
// do processing
}
}
Hope this helps!