diff --git a/classes/controller.php b/classes/controller.php index 1abc3c6a..7665e51f 100644 --- a/classes/controller.php +++ b/classes/controller.php @@ -1107,8 +1107,8 @@ class AdminController $page->folder($ordering . $slug); - if (isset($input['type'])) { - $type = (string) $input['type']; + if (isset($input['type']) && !empty($input['type'])) { + $type = (string) strtolower($input['type']); $name = preg_replace('|.*/|', '', $type) . '.md'; $page->name($name); $page->template($type);