page update
This commit is contained in:
@@ -43,14 +43,6 @@ class AccessControl
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check page/ prefix with slug lookup
|
||||
if (str_starts_with($normalizedPath, 'page/')) {
|
||||
$pageSlug = substr($normalizedPath, strlen('page/'));
|
||||
if (in_array($pageSlug, $this->configuredPublicPaths, true)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Check always-public prefixes
|
||||
foreach (self::ALWAYS_PUBLIC_PREFIXES as $prefix) {
|
||||
if (str_starts_with($normalizedPath, $prefix)) {
|
||||
|
||||
@@ -430,7 +430,7 @@ function navActivePublicPages(array $extraSlugs = []): array
|
||||
}
|
||||
|
||||
// "page/<slug>" routes and known standalone slugs should highlight the same nav entry.
|
||||
$publicSlugs = array_merge(['imprint', 'privacy'], $extraSlugs);
|
||||
$publicSlugs = array_merge(['imprint', 'privacy', 'terms'], $extraSlugs);
|
||||
$isActive = strpos($current, 'page/') === 0 || in_array($current, $publicSlugs, true);
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user