It seems you are using Collin Williams' CI Template library.
As far as I know, you can't define a region inside another one, so it is better to send the value of the internal region (which you called it success
) into the main
region.
- If you are using
$this->template->write();
method to write content to the main
region:
Get the content of thank_you
view file by using $this->load->view('thank_you', '', TRUE);
and place it somewhere inside the second parameter of write()
.
- If you are using
$this->template->write_view()
method:
Use the following:
$data = array(
'foo' => 'bar',
'baz' => 'qux',
'success' => $this->load->view('thank_you', '', TRUE)
);
$this->template->write_view('main', 'main_region_view_file_here', $data/*, TRUE*/);
And add the following inside the view file of the main
region:
if (! empty($success)) {
echo $success;
}
I don't have any experience with Collin Williams' Template library, but I think this might do the trick.
By the way, If you had any problem, I'm all ears!