diff --git a/system/blueprints/config/system.yaml b/system/blueprints/config/system.yaml index 2badbf131..7c6b0fb0f 100644 --- a/system/blueprints/config/system.yaml +++ b/system/blueprints/config/system.yaml @@ -12,12 +12,13 @@ form: fields: home.alias: type: pages - size: medium + size: large classes: fancy label: PLUGIN_ADMIN.HOME_PAGE show_all: false show_modular: false show_root: false + show_slug: true help: PLUGIN_ADMIN.HOME_PAGE_HELP home.hide_in_urls: diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 279d7024d..457701ce3 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -552,14 +552,17 @@ class Pages * Get list of route/title of all pages. * * @param Page $current - * @param int $level + * @param int $level * @param bool $rawRoutes * + * @param bool $showAll + * @param bool $showFullpath + * @param bool $showSlug + * @param bool $showModular + * @param bool $limitLevels * @return array - * - * @throws \RuntimeException */ - public function getList(Page $current = null, $level = 0, $rawRoutes = false, $showAll = true, $showFullpath = false, $showSlug = false, $limitLevels = false) + public function getList(Page $current = null, $level = 0, $rawRoutes = false, $showAll = true, $showFullpath = false, $showSlug = false, $showModular = false, $limitLevels = false) { if (!$current) { if ($level) { @@ -594,8 +597,8 @@ class Pages if ($limitLevels == false || ($level+1 < $limitLevels)) { foreach ($current->children() as $next) { - if ($showAll || $next->routable()) { - $list = array_merge($list, $this->getList($next, $level + 1, $rawRoutes, $showAll, $showFullpath, $showSlug, $limitLevels)); + if ($showAll || $next->routable() || ($next->modular() && $showModular)) { + $list = array_merge($list, $this->getList($next, $level + 1, $rawRoutes, $showAll, $showFullpath, $showSlug, $showModular, $limitLevels)); } } }