I have a page in my theme which displays categories. The URL is /category, and my index.php file looks something like this:
Code: Select all
if ($Url->whereAmI() == "home")
include_once(THEME_DIR_PHP . "home.php");
elseif ($Url->uri() == "/category") {
$Url->setHttpCode(200);
include_once(THEME_DIR_PHP . "category-list.php");
}
elseif ($Url->whereAmI() == "page") {
include_once(THEME_DIR_PHP . "page.php");
}
Is there a way to prevent this, and get $Site->notFound() to return false? The call to $Site->setHttpCode(200) doesn't achieve this. Perhaps there is a better way of having a page built into the theme?
Cheers,
Jon