User Tools

Site Tools


404

Custom 404 Page

The standard content file for the error 404 page is created and saved in “/data/other/404.xml”.

To customize it create a new page with slug1) 404. It will override the standard version.

The code is in index.php

# define page, spit out 404 if it doesn't exist
$file = GSDATAPAGESPATH . $id .'.xml';
$file_404 = GSDATAOTHERPATH . '404.xml';
$user_created_404 = GSDATAPAGESPATH . '404.xml';
if (! file_exists($file)) {
	if (file_exists($user_created_404)) {
		//user created their own 404 page, which overrides the default 404 message
		$file = $user_created_404;
	} elseif (file_exists($file_404))	{
		$file = $file_404;
	}
	exec_action('error-404');
}

Links

Back to the GetSimple Wiki Contents Page

Pages in this Section

Adding and Editing Content

1)
Slug: See wiki section: Admin Reference/GetSimple Basics
404.txt · Last modified: 2014/01/15 23:15 by datiswous