finish ti
This commit is contained in:
parent
fadb1e4742
commit
ed9a5bd936
@ -1,6 +1,6 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<div class="logo"><img class="standard-logo" src="http://www.adlerka.sk/wp-content/uploads/2021/09/Logo_text_Adlerka_modro_cerveno_biele-e1652431356820.png" title="Adlerka"></div>
|
<div class="logo"><img class="standard-logo" src="http://www.adlerka.sk/wp-content/uploads/2021/09/Logo_text_Adlerka_modro_cerveno_biele-e1652431356820.png" title="Adlerka"></div>
|
||||||
<ul>
|
<ul class="navsite_list">
|
||||||
__NAV_PAGES__
|
__NAV_PAGES__
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
@ -1,14 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
//ob_start();
|
ob_start();
|
||||||
|
|
||||||
$navpage_template = '<li><a href="__LOCATION__" __CLASS__>__NAME__</a></li>';
|
$navsite_template = '<li><a class="navsite_link" href="__LOCATION__" __CLASS__>__NAME__</a><ul class="navpage_list"></ul></li>';
|
||||||
|
$navpage_template = '<li><a class="navpage_link" href="__LOCATION__" __CLASS__>__NAME__</a></li>';
|
||||||
|
|
||||||
$page_dir = "pages";
|
$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();
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user