瀏覽代碼

only read menus that exist (instead of cryptically failing)

master
Dom SP 3 年之前
父節點
當前提交
5c20af1e5d
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. +7
    -5
      index.php

+ 7
- 5
index.php 查看文件

@@ -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…
取消
儲存