This is an old revision of the document!
Table of Contents
twistienav Plugin
Compatible with DokuWiki
Angua, Adora Belle, !2014-09-29 "Hrun", DetritusDetritus, Elenor Of Tsort
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to twistienav4bootstrap3
This plugin adds small glyphs after breadcrumbs concerning a namespace that contains more than a start page (topbar.txt is also ignored). Clicking that glyph will display a small pop-up containing an index of the related namespace. It was originally aimed at “you are here” type breadcrumbs but it also works for regular breadcrumbs.
Installation
This plugin now probably requires “Detritus” or later version
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Basic Usage
- Turn on Dokuwiki's youarehere or breadcrumbs setting
- Click the glyphs added after namespace breadcrumbs and enjoy
Template requirements
TwistieNav is developped above Dokuwiki's default template so it should be compatible with any template based on same markup.
- [
You are here
] has to be a collection of links wrapped into adiv
withyouarehere
class - [
Breadcrumbs
] has to be a collection of links wrapped into adiv
withtrace
class - [
pageId
] has to be aspan
wrapped into adiv
withpageId
class
Get more
Settings
- startPagesOnly : only add TwistieNavs to breadcrumbs leading to a namespace start page [default: enabled]. If disabled, any breadcrumb can recieve a TwistieNav (as long as it leads to a namespace containing more than excluded pages).
- exclusions : only add TwistieNavs to breadcrumbs leading to namespaces containing more than any combination of selected pages. By default, both
start
andsidebar
pages are excluded. You can add custom exclusions with the text field (add page names as a comma separated list liketopbar,other_sample
). IMPORTANT: start pages shouldn't be excluded ifstartPagesOnly
isn't enabled and will however never be excluded from 'pageId' TwistieNavs. - twistieMap : if enabled, TwistieNavs showing wiki home index will use a map glyph instead of default one [default: disabled].
- pageIdTrace : if enabled, the plugin will look for a
pageId
HTML element and turn it into a short hierarchical trace [default: disabled] (see below for details). - pageIdExtraTwistie : if enabled, the plugin will look for a
pageId
HTML element and attempt to add an extra TwistieNav that will show a popup with global index [default: enabled]. - style : choose between SVG images and Font Awesome glyphs. IMPORTANT: Font Awesome has to be loaded by the template or by a plugin, it is too heavy to be worth including it in TwistieNav.
PageId trace
If the corresponding setting is enabled, TwistieNav will search a [pageId
] element (usually a pseudo tab in top right corner of content with current page ID) and try to turn it into a short hierarchical trace with text links to open popups.
Note that this is a bit experimental and I didn't build any specific CSS rule right now…
Change glyphs
Latest version uses a selection of SVG images (and corresponding PNG images) from IcoMoon or Font Awesome glyphs (if your template or a plugin loads it). In addition, I included old plugin's PNGs (but only in that format).
The available images are :
A few notes :
- SVG images are also provided in PNG format but the two colored images are only provided as PNG
- the method used to insert the SVG images doesn't allow to color them through CSS
- Font Awesome glyphs can be colored through CSS and will scale according to breadcrumbs font size
What you need to do is to add/expand custom user style and override style from plugin's style.less
.
Paths to images will have to be relative to the user style file you use.
Development
Change Log
2016/05/08 version prevents popups from going off-screen (see details
2016/05/03 version brings many changes (urlrewriting and regular breadcrumbs support)
- Fix breadcrumbs divs detection (2020-04-16 08:22)
- Update plugin.info.txt (2020-04-16 07:57)
- Merge branch 'master' of https://github.com/geekitude/dokuwiki-plugin… (2020-04-16 07:52)
- Merge pull request #8 from WebFreak001/add-useheading-config (2020-03-27 10:11)
- Add useheading config back (2020-03-05 11:50)
- Only change PageID element in `show` mode (2019-11-16 07:57)
- Support wider range of HTML elements (2019-02-09 09:20)
- Only compute $ID from 'HTTP_REFERER' when required (2019-01-27 09:15)
Wish List
support for URL re-write(done with 2016-05-03 version)add support for Configuration Setting: start(should be ok with 2016-05-01 version)
FAQ
I can't see the “you are here” navigation even if I enable it.
Not all templates support “you are here”. Try the default one. By default, TwistieNav now supports both “trace” and “you are here” Breadcrumbs types so this question is irrelevant.
Once TwistieNav is enabled, current ID breadcrumb isn't highlighted anymore, is this normal ?
Currently it is, will see later if it is requested by users and can be changed (wich is quite not sure).
I enabled pageIdTrace
(or pageIdExtraTwistie
) but nothing is added to templates' “pageId” element.
The plugin can only interfere with template's “paegId” if it's HTML markup is close Dokuwiki's default template. Let me know wich template you use and I'll see if I can fix that.
Once TwistieNav is enabled, “you are here” separation character between links are removed, is this normal ?
Currently it is, will see later if it is requested by users.
Discussion
Please use Github issue tracker or this forum thread.