Browse Source

only read menus that exist (instead of cryptically failing)

master
Dom SP 3 years ago
parent
commit
5c20af1e5d
1 changed files with 7 additions and 5 deletions
  1. +7
    -5
      index.php

+ 7
- 5
index.php View File

@@ -148,11 +148,13 @@ for ($i=1;$i<=count($url_ex);$i++) {
$f3->set('url', $url);
$f3->set('is_home', in_array($url[0],["/","/home"]));
$f3->set('level', 1); // this is for templates, to be abl to count nesting
read_menu("main");
read_menu("footer");
#read_menu("network");
read_menu("languages");
read_menu("mobilelang");

if (is_array($f3->get('nav'))) {
foreach ($f3->get('nav') as $k=>$v) {
read_menu($k);
}
}





Loading…
Cancel
Save