From eb26ead488d64ffd2e9dd02d665450c6489b39b7 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sat, 15 Oct 2011 21:01:44 +0200 Subject: fix css, link title --- action.php | 38 ++++++++++++++++++++------------------ style.css | 13 ++++++++----- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/action.php b/action.php index cbf20c9..941937c 100644 --- a/action.php +++ b/action.php @@ -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); } } diff --git a/style.css b/style.css index d4b9944..5e061e6 100644 --- a/style.css +++ b/style.css @@ -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 -- cgit v1.2.1