mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 02:46:04 +01:00
Fix for homepage in pages as it uses a route
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user