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