diff --git a/public/index.php b/public/index.php index 4965702..2825b3b 100644 --- a/public/index.php +++ b/public/index.php @@ -320,7 +320,15 @@ class CodePressCMS { if ($i === count($parts) - 1) { $breadcrumb .= ''; } else { - $breadcrumb .= ''; + // Check if directory has index file + $dirPath = $this->config['content_dir'] . '/' . $path; + $hasIndex = file_exists($dirPath . '/index.md') || file_exists($dirPath . '/index.php') || file_exists($dirPath . '/index.html'); + + if ($hasIndex) { + $breadcrumb .= ''; + } else { + $breadcrumb .= ''; + } } }