0) { // Determine Page Title from first heading $firstHeading = p_get_first_heading($startPageID); if ($conf['useheading'] && !empty($firstHeading)) { $linkName = $firstHeading; } else { $linkName = $startPageName; } // echo "" . $conf['useheading'] .""; tpl_pageLinkCreate($startPageID, ''.$linkName, "tpl_processStartPage:$context"); } } } function tpl_pageLinkCreate($fileToLinkID, $linkName, $calledFrom) { global $ID; echo ""; if ($_REQUEST["do"] == "admin" && $_REQUEST["page"] == "acl") { $path = wl($fileToLinkID, "do=admin&page=acl"); } else { $path = wl($fileToLinkID); } // echo "$fileToLinkID, $linkName, $calledFrom"; tpl_link($path,$linkName); } function tpl_list_folder($dataList, $findAndProcessStartpage) { global $conf; global $ID; global $INFO; require_once(DOKU_INC.'inc/auth.php'); $currentLevel = 1; echo "
\n", $currentLevel - $dataList[$i]["level"]); $currentLevel = $dataList[$i]["level"]; } // if entry is a folder if ($dataList[$i]["type"] == "d") { if ($dataList[$i]["open"]) { $folder_status = 'open'; } else { $folder_status = 'close'; } echo '
  • '; if ($_REQUEST["do"] == "admin" && $_REQUEST["page"] == "acl") { $path = wl($dataList[$i]["id"].":".$conf['start'], "do=admin&page=acl"); } else { $path = wl($dataList[$i]["id"].":".$conf['start']); } // echo "

    Path: $path, LinkName: $linkName

    "; tpl_link($path, '' . $linkName); } else { // entry is a file // echo "

    Path: $path, LinkName: $linkName, id: ". $dataList[$i]["id"] . "

    "; tpl_pageLinkCreate ($dataList[$i]["id"], '' . $linkName, "direkt:tpl_list_folder"); } if ($dataList[$i+1]["level"] == $currentLevel) { // current folder (just close list-item) echo "
  • \n"; } else if ($dataList[$i+1]["level"] > $currentLevel) { // new sub-folder (start new sub-list) echo '\n", $currentLevel - $dataList[$i+1]["level"]); } } $currentLevel = $dataList[$i+1]["level"]; } } } echo "
    \n"; } global $ID; global $ACT; global $conf; $folder = getNS($ID); require_once(DOKU_INC.'inc/search.php'); require_once(DOKU_INC.'inc/html.php'); $ns = cleanID($ID); if (empty($ns)) { $ns = dirname(str_replace(':','/',$ID)); if ($ns == '.') $ns =''; } $ns = utf8_encodeFN(str_replace(':','/',$ns)); $list = array(); search($list,$conf['datadir'],'search_index',array('ns' => $ns)); tpl_list_folder($list,true); ?>