From 79569437e2220563e927b47dddfbb48527dc0d42 Mon Sep 17 00:00:00 2001 From: Edwin Noorlander Date: Sat, 22 Nov 2025 16:53:00 +0100 Subject: [PATCH] Fix directory title display to use formatDisplayName - Apply formatDisplayName() to directory names in getDirectoryListing() - This ensures language prefixes are removed from directory titles - nl.php-testen directory now displays as 'Php-testen' instead of 'Nl.php-testen' - Footer now shows correct page titles for directories - Consistent display naming for both files and directories --- engine/core/class/CodePressCMS.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/engine/core/class/CodePressCMS.php b/engine/core/class/CodePressCMS.php index 7a67e4e..5e80b15 100644 --- a/engine/core/class/CodePressCMS.php +++ b/engine/core/class/CodePressCMS.php @@ -705,12 +705,9 @@ class CodePressCMS { // Get the directory name from the path, not from a potential file $pathParts = explode('/', $pagePath); $dirName = end($pathParts); - $title = ucfirst($dirName) ?: 'Home'; + $title = $this->formatDisplayName($dirName) ?: 'Home'; - // Force the title to be correct $content = '

' . htmlspecialchars($title) . '

'; - - // Debug: ensure we're returning the right title $result = [ 'title' => $title, 'content' => $content