I would like to create a custum page.
in my index.php i am using
Code: Select all
if ($Url->slug() == "news"){
include(THEME_DIR_PHP.'news.php');
}elseif ($Url->whereAmI() == 'page') {
include(THEME_DIR_PHP.'page.php');
} elseif ($Url->whereAmI() == 'post') {
include(THEME_DIR_PHP.'post.php');
} elseif ( ($Url->whereAmI()=='blog') || ($Url->whereAmI()=='tag') ) {
include(THEME_DIR_PHP.'works.php');
}
This works good, but bludit throws an error, that i cant build a page object for "news". Creating a "news" page solves this.
Is there a way to add this to the Url-Object?
Greetings
matto