From 2fdcc0fcbd11dc28685de7d6cad0fa66497e5349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Thu, 11 Jan 2024 16:02:10 +0100 Subject: [PATCH] try --- templates/navpages.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/navpages.php b/templates/navpages.php index eeca87c..8cbdc15 100644 --- a/templates/navpages.php +++ b/templates/navpages.php @@ -1,5 +1,4 @@ __NAME__'; $navpage_template = '
  • __NAME__
  • '; @@ -7,9 +6,10 @@ $navpage_template = '
  • _ $site_dirs = array_diff(scandir($static_page_dir), array('.', '..')); +$nav_out = ""; + foreach($site_dirs as $site_dir){ - echo "trying $static_page_dir/$site_dir"; - $pages_dir = array_diff(scandir("$static_page_dir/$site_dir"), array('.', '..')); + $pages_dir = array_diff(scandir("$static_page_dir$site_dir"), array('.', '..')); $navsite = $navpage_template; $site_location = "$site_dir.$domain.$tld/$default_page"; @@ -42,8 +42,9 @@ foreach($site_dirs as $site_dir){ $navpages .= $navpage; } $navsite = str_replace("__NAVPAGES__", $navpages, $navsite); + $nav_out .= $navsite; } -return ob_get_clean(); +return $nav_out; ?> \ No newline at end of file