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
This commit is contained in:
parent
b31a82001e
commit
79569437e2
@ -705,12 +705,9 @@ class CodePressCMS {
|
|||||||
// Get the directory name from the path, not from a potential file
|
// Get the directory name from the path, not from a potential file
|
||||||
$pathParts = explode('/', $pagePath);
|
$pathParts = explode('/', $pagePath);
|
||||||
$dirName = end($pathParts);
|
$dirName = end($pathParts);
|
||||||
$title = ucfirst($dirName) ?: 'Home';
|
$title = $this->formatDisplayName($dirName) ?: 'Home';
|
||||||
|
|
||||||
// Force the title to be correct
|
|
||||||
$content = '<h1>' . htmlspecialchars($title) . '</h1>';
|
$content = '<h1>' . htmlspecialchars($title) . '</h1>';
|
||||||
|
|
||||||
// Debug: ensure we're returning the right title
|
|
||||||
$result = [
|
$result = [
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
'content' => $content
|
'content' => $content
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user