Fix for homepage in pages as it uses a route

This commit is contained in:
Andy Miller
2020-03-06 12:33:26 -07:00
parent 0f87a2691b
commit 559e2adbf2

View File

@@ -2309,8 +2309,15 @@ class AdminController extends AdminBaseController
}
if ($is_page) {
// Try the path
/** @var PageInterface $page */
$page = $pages->get(GRAV_ROOT . $route);
// Try a real route (like homepage)
if (is_null($page)) {
$page = $pages->dispatch($route);
}
$path = $page ? $page->path() : null;
} else {
// Try a physical path