function show_404($page = ''){ // error page logic
header("HTTP/1.1 404 Not Found");
$heading = "404 Page Not Found";
$message = "The page you requested was not found ";
$CI =& get_instance();
$metadata[AppContants::META_TITLE] = '404 Page Not Found | Door and Window';
$metadata[AppContants::META_KEYWORDS] = '';
$metadata[AppContants::META_DESCRIPTION] = '';
$CI->setMeta($metadata);
$params['LAYOUT_MAINVIEW']='404_page';
$CI->renderView($params);// this is the function in my controller which sets the parameter for my template.Or it would also be very helpful if i can load the view directly as show below.
$CI->load->view('404_page'); // Loading view directly.
}