diff --git a/libs/daux_helper.php b/libs/daux_helper.php index 5050579..901efed 100644 --- a/libs/daux_helper.php +++ b/libs/daux_helper.php @@ -178,7 +178,7 @@ EOT; $entry = new Directory_Entry($path, $new_parents); if ($mode === Daux::STATIC_MODE) $entry->uri .= '.html'; } - if ($entry instanceof Directory_Entry) $node->value[$entry->uri] = $entry; + if ($entry instanceof Directory_Entry) $node->value[$entry->uri] = $entry; } $node->sort(); $node->first_page = $node->get_first_page(); diff --git a/templates/default.tpl b/templates/default.tpl index 2317e5b..cdfb282 100644 --- a/templates/default.tpl +++ b/templates/default.tpl @@ -11,22 +11,23 @@ private function build_navigation($tree, $path, $current_url, $base_page, $mode) { $nav = ''; - foreach ($tree->value as $url => $node) { + foreach ($tree->value as $node) { + $url = $node->uri; if ($node->type === \TodayMade\Daux\Directory_Entry::FILE_TYPE) { if ($node->value === 'index') continue; $nav .= '' . utf8_encode($node->title) . ''; + $nav .= '>' . $node->title . ''; } else { $nav .= 'index_page) $nav .= '' . - utf8_encode($node->title) . ''; - else $nav .= '' . utf8_encode($node->title) . ''; + if ($node->index_page) $nav .= '' . + $node->title . ''; + else $nav .= '' . $node->title . ''; $nav .= '