When no route field is added to a page blueprint, just put it as a root page instead of throwing an error

This commit is contained in:
Flavio Copes
2016-01-14 00:22:26 +01:00
parent 769033739a
commit 2a36608b59

View File

@@ -1094,7 +1094,7 @@ class AdminController
} }
} }
$parent = $route && $route != '/' ? $pages->dispatch($route, true) : $pages->root(); $parent = $route && $route != '/' && $route != '.' ? $pages->dispatch($route, true) : $pages->root();
$original_slug = $obj->slug(); $original_slug = $obj->slug();
$original_order = intval(trim($obj->order(), '.')); $original_order = intval(trim($obj->order(), '.'));