diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2011-10-15 21:01:44 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2011-10-15 21:02:11 +0200 |
commit | eb26ead488d64ffd2e9dd02d665450c6489b39b7 (patch) | |
tree | 18b93302b9511102797e3562b9a554dafc24f7b4 | |
parent | 7c67d22073a502e137241fb3659a77529c5711aa (diff) | |
download | dokuwiki-plugin-treenav-eb26ead488d64ffd2e9dd02d665450c6489b39b7.tar.gz dokuwiki-plugin-treenav-eb26ead488d64ffd2e9dd02d665450c6489b39b7.zip |
fix css, link title
-rw-r--r-- | action.php | 38 | ||||
-rw-r--r-- | style.css | 13 |
2 files changed, 28 insertions, 23 deletions
@@ -11,6 +11,7 @@ require_once DOKU_PLUGIN.'action.php'; function search_namespaces1(&$data,$base,$file,$type,$lvl,$opts){ $opts['listdirs'] = true; + $opts['depth'] = 1; return search_universal($data,$base,$file,$type,$lvl,$opts); } @@ -71,24 +72,20 @@ class action_plugin_treenav extends DokuWiki_Action_Plugin { global $ID; foreach ($node->getChildren() as $child) { foreach ($child->getPages() as $page) { - if ($page['id'] == $child->name . ':start') { - $page_id_start = $page['id']; + if (noNS($page['id']) === 'start') { + $renderer->listitem_open(); + $renderer->cdata('>'); + $this->_renderPagelink($page['id'], $renderer); + if (strpos(getNS($ID), $child->name) === 0) { + // Recursive Call with Sub-Namespace that contains + // current Page ($ID) + $renderer->listu_open(); + $this->_print($child, $renderer); + $renderer->listu_close(); + } + $renderer->listitem_close(); } } - if ($page_id_start) { - $renderer->listitem_open(); - $renderer->cdata('>'); - $this->_renderPagelink($page['id'], $renderer); - if (strpos(getNS($ID), $child->name) === 0) { - // Recursive Call with Sub-Namespace that contains - // current Page ($ID) - $renderer->listu_open(); - $this->_print($child, $renderer); - $renderer->listu_close(); - } - $renderer->listitem_close(); - $page_id_start = NULL; - } } foreach ($node->getPages() as $page) { @@ -109,7 +106,12 @@ class action_plugin_treenav extends DokuWiki_Action_Plugin { $renderer->_media($mediaid, NULL, NULL, 32, 32); } } - // 432 function resolve_mediaid($ns,&$page,&$exists){ - $renderer->internallink($id); + if ($options['title']) { + $title = $options['title']; + } else { + $title = p_get_first_heading($id); + } + + $renderer->internallink($id, $title); } } @@ -1,9 +1,12 @@ -div.dokuwiki div.treenav { +div.dokuwiki div.page div.treenav { width: 300px; - float: left; + position: absolute; + background-color: white; +} + +div.dokuwiki div.page div.page__inner { + position: relative; + margin-left: 300px; } -div.dokuwiki div.page__inner { - float:left; -}
\ No newline at end of file |