DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:twistienav

twistienav Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" yes
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" no

plugin Adds drop-down navigation menus to breadcrumbs (and eventually "pageId" element)

Last updated on
2017-09-28
Provides
Action
Repository
Source

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

  1. Turn on Dokuwiki's youarehere or breadcrumbs setting
  2. Click the glyphs added after namespace breadcrumbs and enjoy

www.geekitude.fr_externe_dokuwiki_twistienav_twistienav_youarehere.jpg

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 a div with youarehere class
  • [Breadcrumbs] has to be a collection of links wrapped into a div with trace class
  • [pageId] has to be a span wrapped into a div with pageId 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 and sidebarpages are excluded. You can add custom exclusions with the text field (add page names as a comma separated list like topbar,other_sample). :!: IMPORTANT: start pages shouldn't be excluded if startPagesOnly 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.

www.geekitude.fr_externe_dokuwiki_twistienav_twistienav_pageidtrace.jpg

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:

www.geekitude.fr_externe_dokuwiki_twistienav_twistienav_images.jpg

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)

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

plugin/twistienav.txt · Last modified: 2017-09-28 06:16 by Geekitude