diff --git a/templates/nav.html b/templates/nav.html
index 2be64f0..75684ab 100644
--- a/templates/nav.html
+++ b/templates/nav.html
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/templates/navpages.php b/templates/navpages.php
index 93bf61c..e9df776 100644
--- a/templates/navpages.php
+++ b/templates/navpages.php
@@ -1,14 +1,26 @@
__NAME__';
+$navsite_template = '
__NAME__';
+$navpage_template = '__NAME__';
$page_dir = "pages";
-$files1 = scandir($page_dir);
+$site_dirs = array_diff(scandir($page_dir), array('.', '..'));
-echo print_r($files1, true);
+$domain = basename(explode('.', $_SERVER['HTTP_HOST'])[1]);
+$tld = basename(explode('.', $_SERVER['HTTP_HOST'])[2]);
-//return ob_get_clean();
+foreach($site_dirs as $site_dir){
+ $pages_dir = array_diff(scandir("$page_dir/$site_dir"), array('.', '..'));
+ $navpages = "";
+ foreach($pages_dir as $page_dir){
+ $navpage = $navpage_template;
+ $navpage =
+ $navpages .= $navpage;
+ }
+}
+
+return ob_get_clean();
?>
\ No newline at end of file