It's better when it's simple

User Tools

Site Tools


Indexmenu v2 Plugin

Compatible with DokuWiki


plugin Show a tree menu for a namespace

Last updated on
Syntax, Action
Conflicts with
indexmenu, mathjax, tindexmenu, yalist

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 alphaindex, indexmenu, tindexmenu

Tagged with ajax, listing, menu, namespace, navigation

This plugin shows the index menu for a namespace. Its core features:

  • Indexable menu, even in the JavaScript mode.
  • Index is accessible, even if JavaScript fails to load.
  • Support of multiple types of NS headpages:
    1. classic indexmenu, headpage within namespace - ns/ns.txt
    2. classic DokuWiki, headpage outside namespage - ns.txt
    3. headpage as start page - ns/<start_page>.txt
  • Support index sorting: filename, creation date, page title
  • Look&feel could be easily adjusted to any needs by changing the supplied CSS files
  • Ajax-aware submenus
  • Allows to convert any unordered list to the navigation menu, including nested indexmenus


Syntax for {{indexmenu}}

Values in square brackets are optional.

{{indexmenu>namespace[#[n][+nons]][#sort+[!]<sort_type>] [|js[#[theme][+ajax]]]}}
Option Description Comments Req/Opt
namespace Namespace name from which the index starts. Take a look at namespaces for the complete reference. required
n Number that specifies the max level of the tree index nodes. With nons means the max depth of the pages to put in list. optional
nons Exclude namespaces nodes from index. When set, only pages are included in the index. optional
sort Enable sorting Indicates that menu should be sorted by the sort_type parameters optional
sort_type One of the following: fn - filename
title - page heading
date file creation date.
! - exclamation mark in front of the sorting mode means reversed sort.
js Use JavaScript to add fancy dynamic stuff to the menu [n] keeps its meaning optional
theme Skin name for indexmenu2, when in js mode. a theme is a set of CSS files and icons inside plugins/indexmenu/templates/DokuWiki/<skin> optional
ajax Enables Ajax-driven index When set, submenus below [n] level will be taken from the server using Ajax optional


Example that display a JavaScript Index tree menu with nodes open till second level:


The same, when used on the wiki page


Wiki theme for js option.


Standard Dokuwiki index showing only pages inside wiki:plugins and lower namespaces (max two levels):


Use 'IndexMenu' theme and build submenus below 2nd level using Ajax calls.


Use 'IndexMenu' theme and build submenus below 2nd level using Ajax calls. Sort it by the page title in reversed order.


Syntax for <navigation>

In general, options are equal to syntax_for_indexmenu, but it use only js, theme and ajax.


  1. Navigation module will suppress JavaScript and theme settings for the nested indexmenus.
  2. Navigation module will remove any non-list content from its root, see example below.


This example shows the general usage:

<navigation |js#IndexMenu+ajax>
this text will be removed, because it stay outside the menu
  * [[http://somesite| Some internet site]]
    * [[http://somesite/someurl| Interesting URL on some site]]
    * [[http://somesite/someimage| {{http://somesite/someimage}}]] - image from some site
  * just a text, it won't act as a link
  * [[here should be a link to make submenu collapsible]]
    * no need to put anchors here
    * but, does it make a sense to create submenu without a links?
  * {{indexmenu>:#2#sort+title+rev|js}}



In this release, Indexmenu2 utilizes the global $conf['plugin_indexmenu'] options array.

Array keys: hide_headpage - is kept as is. skip_index - new option. It is regular expression, describes what pages and namespaces will be removed from the index. Suggested option is:


empty_message - message that will be printed, when no index is available

DokuWiki-2006-11-06 and up

Use the built-in configuration manager.

Showing the namespace title is controlled by global DokuWiki's option useheading.

JavaScript menu

JavaScript menu is implemented using The Complete Menu Solution code, adapted to DokuWiki standards.

Themes and skins

Creation of new themes is slightly harder than in original indexmenu, but much more flexible.

To create new skin follow next steps:

  1. create folder under indexmenu/templates/DokuWiki/, f.e. NewSkin
  2. copy one of the existsing design.css files to indexmenu/templates/DokuWiki/NewSkin folder
  3. find strings like CmsListMenuDokuWiki<more_text>
  4. replace <more_text> with NewSkin

Ok, new skin is done. Now you can update images or alter CSS definitions for your skin.

For more detailed info check the datasheet.

Use your skin with js#NewSkin syntax, remember - skin name is case sensitive.

Distribution contain 3 themes:

  • default, DokuWiki's list style
  • Simple, simple + and - signs next to nodes
  • IndexMenu skin, original indexmenu icons.

How to install

Search and install the plugin using the Extension Manager.

Alternatively, refer to Plugins on how to install plugins manually. Download the file and unpack it into lib/plugins folder. Caching can be expired by resaving the Configuration Manager.


  • 2009-13-01 Version 2.1.2:
    • changed JavaScript loading, made it more stable and compatible to the latest releases
  • 2007-07-05 Version 2.1.1:
    • added support for built-in index action replacement
    • JS engine switched to 0.5.12 release
  • 2007-13-02 Version 2.0.3:
    • special Safari update
    • JS engine switched to 0.5.11 release
    • added Ajax support to Safari
  • 2007-10-02 Version 2.0.2:
    • put back missing 'title' calculation
    • fixed sorting
  • 2007-10-02 Version 2.0.1:
    • fixed notice on missing argument
  • 2007-10-02 Version 2.0.0:
    • fixed bug FS#9, link to namespace without the headpage now points to the $conf['start'] page
    • plugin considered stable and released
  • 2007-09-02 Version 2.0b5:
    • 'rev' sort modifier replaced with ! mark
    • rewritten Ajax callback, added sorting support (FS#11)
    • plugin requires RemoteScript v0.8 with new query interface
  • 2007-02-02 Version 2.0b4:
    • fixed several issues
  • 2007-01-02 Version 2.0b3:
    • fixed broken XHTML, thanks to kite [at] puzzlers [dot] org
    • fixed missing empty message
    • updated CompleteMenuSolution to 0.5.9 release
    • added support of '.' (current) namespace for the sidebars inclusion
  • 2007-01-09 Version 2.0b1:
    • added <navigation> component
    • made some refactoring
    • indexmenu now does not suppress standard link coloring
  • 2006-12-22 Version 1.11.3:
    • fixed issue with incorrect path handling in Ajax mode
  • 2006-12-12 Version 1.11.1:
    • fixed issue with incorrect detection of the active template
  • 2006-12-12 Version 1.11:
    • project has been uploaded to SVN
    • slightly changed the directory structure
    • fixed issue with incorrect detection of the root namespace
    • fixed incompatibility with include, tested with Chris's release
    • fixed the number of small misspellings
  • 2006-08-12 Version 1.10:
    • fixed RemoteScript callback, now it does return appropriate error message, if targeted namespace is empty
  • 2006-10-11 Version 1.9:
    • added sorting
    • removed lots of the useless code
    • added support of the config manager
  • 2006-10-11 Version 1.8:
    • fixed harvesting of subpages, when headpage is on the same level, as it's namespace.
  • 2006-10-10 Version 1.7:
    • fixed RemoteScript plugin autodetection
    • added correct notice, when this plugin is not available
  • 2006-09-04 Version 1.6:
    • fixed bug FS#4 - incorrect path used for other than root DokuWiki installation
  • 2006-09-04 Version 1.5:
    • fixed bug FS#2 in JS mode: root namespace index does not work
  • 2006-09-03 Version 1.4:
    • updated JS part to keep submenu open, when following it's link
    • if no headpage found, menu has the link to the namespace's index
  • 2006-09-02 Version 1.3:
    • rewritten entire menu creation code
    • refactored Syntax part
    • removed the useless code
  • 2006-09-02 Version 1.2-r1:
    • fixed errors under PHP 4.4.2
  • 2006-08-31 Version 1.2:
    • bugfixed IndexMenu theme for Opera 9
    • updated Ajaxum plugin to detect remotescript presence
    • updated menu core
    • minor fixes
  • 2006-08-24 Version 1.1:
    • rewritten code for list creation
    • added Ajax controller and option
    • added dependency on remotescript
  • 2006-08-09 Version 1.0:
    • Released.



Bugs are moved to bugs



I don't know if i do that correctly with this here…

So, Hi at first, I've installed that indexmenu2. monobook is also on my wiki… so my problem is, that the index menu (at the right side, that thing that show all nodes in the article (H1, H2, H3…) hasn't the correctly text align. so when it is expanded, the text isnt at the right side, it beginns at the end of the indes. when i collaps it, it's the same problem. You understand me?

Is that a bug, or a incorrect file?

Feature request

Bugtracker is available.

Hide pages from IndexMenu

Hi. I wanted to hide 'archived' pages. But I don't like to rename or move pages. So I added the following code in syntax.php:
   //Set title and link
   if (!$conf['useheading'] || !$title=p_get_metadata($id,'title')) $title=noNS($id);
   // hide titles starting with an # ...
   if( $title[0] == '#' ) return false;
So, I can hide a page by editing the first heading. – Christoph Purrucker, 2007-06-26

Possible features

Implemented in indexmenu

The functionality provided by the navigation component is now also available in the indexmenu plugin. See — Ahmet Sacan 2009/09/20

Does not work in Adora Belle

Unfortunately, this plugin is not compatible with version “Adora Belle” of dokuwiki, released in october 2012. Instead of the tree of folders, only an icon shows up. Resolution for me: Use the indexmenu. – KaiMartin 2012/10/28

plugin/indexmenu2.txt · Last modified: 2023-12-21 16:19 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki