10-30-2020, 04:24 AM
my view implementation is such that all my views are passed as data to rendered on a general template. however sometimes i also need to pass data inside these views that are to be returned as views.
for example
My question is how do i pass the flashdata to be rendered in the $page_content['content']?
for example
PHP Code:
public function myview()
{
$_SESSION['error] = 'this is an error';
$this->session->mark_as_flash('error');
//creating the view
//this is the page that will be passed as data
$page_content['content'] = $this->$this->load->view('example-folder/example-page', $example-data, TRUE);
//this is the template layout page
$this->load->view('nurse/home', $page_data);
}