Compatible with DokuWiki
Similar to alphaindex, indexmenu2, navi, simplenavi
This plugin allows you to insert a fully customizable index or a list of pages starting from a specified namespace. It should be useful in DokuWiki sites where pages are organized by namespaces. Main features are:
The indexmenu plugin is not sponsored by anyone but I develop and support it for free during my spare time. If want to offer me a friendly beer 1), you can consider to make a donation.
| Main | Options |
|---|---|
| {{indexmenu>ns[#n] [ns1[#n] ns2[#n] …] | | [js[#theme]] [tsort] … }} |
Arguments inside ”[]” parenthesis are optional. The # char is always required with related options.
Settings before the “|” separator:
| Main | Action | Note |
|---|---|---|
ns | Main namespace name. Index starts from here. Syntax complies with DokuWiki namespaces paths. | “.” refers to the namespace of the page containing the indexmenu syntax and not to the current DokuWiki namespace context 2) (see the context option for this feature). “..” or an empty value shows the root site namespace. |
#n | n is a number that specifies how many namespace levels to display open under the main namespace. | If it's not defined then the whole tree, till the deeper node, will be open. If 0 or 1 it'll display only nodes under the main namespace. For example: ”#2” will display “root:myns1:myns2” but will keep myns2 closed thus hiding “root:myns1:myns2:myns3”. Optional. |
ns1[#n] ... nsn[#n] | A list of optional namespaces inside the main namespace. Every namespace will be opened or closed at the specified n level. Syntax complies with DokuWiki namespaces. | If n is not defined then all namespaces are open, if 0 they are closed. “.” refers to the namespace of the page containing the indexmenu syntax and not to the current DokuWiki namespace context 3) (see the context option for this feature). “..” or an empty value shows the root site namespace. Optional. |
Optional settings after the “|” separator:
| Option | Action | Note |
|---|---|---|
js | JavaScript render method: the index is an expandable tree menu. | Without n, all nodes are open, with it, nodes are open till n level. |
navbar | The tree opens itself automatically at the current page namespace. Useful in a navigation sidebar. | It works with or without js option. Without js option, the indexmenu page is never cached (just like the default DokuWiki index page) and the DokuWiki loading could be slower depending on the amount of child nodes displayed. |
context | Relative main namespace and optional namespaces will refer to the current DokuWiki namespace context 4) instead of to the namespace of the page containing the indexmenu syntax. Useful in a navigation sidebar. | It works with or without js option. In both cases, the indexmenu page is never cached so the DokuWiki loading could be slower depending on the amount of child nodes displayed (In js mode, when a lot of nodes are usually displayed, the max option is recommended). It automatically enable the nocookie option. |
tsort | Sort (only) pages by title. | Useful when useheading is on. By default namespaces are not sorted, you need the nsort option for this. |
dsort | Sort (only) pages by date creation (first the oldest). | By default namespaces are not sorted, you need the nsort option for this. |
msort[#meta] | Sort (only) pages by a custom metadata information. Without the meta parameter, it looks for the custom sorting number specified with the {{indexmenu_n>N}} syntax (see the below metadata tag syntax). meta should refer to the data structure (Array values are managed through the ”:” separator, for example: “msort#date:modified). | By default, pages without metadata tag are sorted by page name (the default DokuWiki way), but you can override this behaviour adding also the tsort or dsort option in the indexmenu syntax. By default namespaces are not sorted, you need the nsort option for this. |
rsort | Reverse the sorting of pages. | By default namespaces are not sorted, you need the nsort option for this. |
nsort | Sort also namespaces according to page sort options. | To use in addition to the above sort options. tsort option will apply to headpages. |
nons | Exclude namespaces nodes from index. It shows only the pages. | Without js, the closing n namespace option prevents to display nodes below the n namespace level. |
nopg | Exclude pages nodes from index. It shows only the namespaces. | |
max#n[#m] | If initially closed, the node at n level will retrieve all its child nodes through the AJAX mechanism when opened for the first time. Optionally, the nodes after the n level can be retrieved with AJAX every m sublevels instead of in one go. | It affects the server loading and speeds up the loading of pages in DokuWiki with an high amount of pages. It works only in js. Cookie are automatically disabled, just like with nocookie. |
theme | Theme name for indexmenu icons | A theme is a set of icons inside images directory as described in Theme tutorial. Admins can download and share themes in admin panel. It works only in js |
id[#random|n] | Cookie ID for a js indexmenu where the previously opened/closed nodes by a user are stored. | Useful when a page is uncached and you don't use the nocookie option because it forces the same cookie preventing un-useful cookies created every time a page is viewed by the user. By default is always random even when this option is not specified, but you can force it to be a n fixed number ( i.e id#20 ). Read the Js does not remember its previous state section. ATTENTION: ID must be unique for every indexmenu in your DokuWiki site or you'll get strange js behaviors. It works only in js |
maxjs#n | It sets how many js tree levels to render when page loads. Remaining nodes are rendered (slightly slower) only when they are open by users, by optional namespaces option, by cookies or by navbar option. | Default n is 1 so that it will speed up the page loading, above all with an high amount of pages. It affects only the user-client CPU speed, not the webserver load. It works only in js |
nocookie | Disable cookies. By default js indexmenu remember selected,open and closed nodes by user during navigation. With this option it doesn't remember them and the tree is blocked to its start status. | It works only in js |
noscroll | Disable the JavaScript scrolling feature. It could solve visualization problems. | It works only in js |
notoc | Disable the TOC-preview feature. | It works only in js |
A sample of an indexmenu JS index that could be used inside a navigation sidebar. Its initial status is blocked by the nocookie option, so, when the page is reloaded, it doesn't remember the open and closed nodes by the user.:
{{indexmenu>..#1|js navbar nocookie}}
JS navigation index with “thread” theme where nodes after the third level are retrieved with Ajax every 2 sublevels. Pages are sorted by title and custom sort number:
{{indexmenu>..#1|js#thread navbar max#3#2 tsort msort}}
Standard DokuWiki index showing only pages inside wiki:plugins and lower namespaces (max two levels):
{{indexmenu>:wiki:plugins#2|nons}}
Js tree showing pages and namespaces both sorted by reverse title. For example,if “archive” contains stuff (“news”,”oldnews”,etc) that you need to quickly organize by time, you could create numbered headpages for every namespace (i.e renaming “oldnews” in “news 2006”, “news” in “news 2010” and so on) and sort them from new to older:
{{indexmenu>:archive#1|js tsort nsort rsort}}
Standard index showing the tree of the current context 5) opened at the second level .
{{indexmenu>playground#2|context}}
JS tree showing all (and only) the namespaces of the “private” namespace sorted by date creation. “private” is relative and refers to the private namespace under the page containing the indexmenu syntax.
{{indexmenu>private|js nopg dsort}}
By default nodes on the same tree level are sorted by name (or by title/date if you use the tsort/dsort syntax), but you can also specify a custom sort number for every page inserting a metadata tag in the pages with this syntax:
{{indexmenu_n>N}}
Where N is a number.
Then you need to use the “msort” option in your indexmenu tree syntax.
If you have the show_sort option enabled in the Configuration Manager, a notice is displayed to admins (only) on every page with this metadata tag (the text defaults to “Indexmenu sort number: N”).
Examples:
You can change the order of this tree containing a mix of standard and useheading pages:
-Root |_don |_Mirror sessions (headline title of the ":mirror" page) |_pachuco |_At the radar station (headline title of the ":radar" page) |_van |_vliet
in this way:
{{indexmenu>..#1|msort}}
-Root
|_vliet {{indexmenu_n>1}}
|_van {{indexmenu_n>2}}
|_don {{indexmenu_n>3}}
|_Mirror sessions (headline title of the ":mirror" page)
|_pachuco
|_At the radar station (headline title of the ":radar" page)
Pages without sort number, like the last three pages, are sorted by page name as default, but you can force a different sort:
{{indexmenu>..#1|tsort msort}}
-Root
|_vliet {{indexmenu_n>1}}
|_van {{indexmenu_n>2}}
|_don {{indexmenu_n>3}}
|_At the radar station (headline title of the ":radar" page)
|_Mirror sessions (headline title of the ":mirror" page)
|_pachuco
| Mirror link: http://xoomer.alice.it/satogni/misc/indexmenu.zip |
Development release contains features and bug fixes that will be in next public release and it should be used for development purposes. Unlike the stable release, included JavaScript files are not compacted so the network load is a little bit higher. Even it should work concerning indexmenu main features, use it only on a test environment or after a backup of your site data.
My site is always based on this release.
The version returned by the development release is always the same of the stable one so upgrading from stable to development with plugin manager does not work. Before installing the development release be sure to have first manually deleted the old indexmenu directory. Also be sure that, as last step, server/client cache is purged following 4 and 5 of the the_tree_is_not_displayed section.
If you're interested, there's also an indexmenu darcs repository.
darcs get --partial http://samuele.netsons.org/darcs/indexmenu
To create a patch, go in your downloaded indexmenu directory and:
#Check for new patches and install them: darcs pull #Modify source files creating your own patch and record it with: darcs record #Send the patch to me via mail: darcs send
At this moment very few languages are supported , but I'll be glad if you want translate indexmenu in your own language or correct my poor english.
Strings to translate are in indexmenu/lang/en/lang.php and indexmenu/lang/en/settings.php.
You can send me translations with darcs or simply via email.
Indexmenu v2.7 compatible with old 2003-09-03 DokuWiki version.
Download the 2003-09-03 zip file and unpack it into lib/plugins folder or use the plugin manager.
Indexmenu is fully configurable from Configuration Manager. Options are explained in the below sections.
First of all, if you want that the tree displays the heading title of pages instead of their name, you need to set the useheading on.
Then, with the headpage global option, you'll be able to set from which pages retrieve titles.
Every namespace will retrieve its title from the heading title of a page, called headpage, and will be linked directly to it.
You can choose a name for the page from which retrieve the title or use a special value:
| Value | Page | Example |
|---|---|---|
| any value | The page inside the namespace | public(ns):myvalue(page) |
| :inside: | a page with the same name of namespace, beneath the namespace | public(ns):public(page) |
| :same: | a page with the same name of namespace, at the same level of the namespace | public(page) ⇔ public(ns) |
| :start: | the global start page name inside the namespace | public(ns):start(page) |
You can specify more than one option using ”,” as separator. For every namespace, every value will be checked till the first existent headpage is found.
To get a better visualization you could use the hide_headpage option, that hides headpages in the rendered indexmenu tree.
Optimize the cache of indexmenu according to ACLs and prevents to display unauthorized nodes.
The choice of the method affects only the visualization of nodes on the indexmenu tree, not the page authorizations. The Groups option is the default setting.
If wrongly set, this option could display to a group of users (ie. the anonymous user) the cached tree of another group (ie: the admin user), thus displaying randomly different trees containing less or more (un)authorized nodes.
There are also important issues in about ACLs and about_empty_namespaces that affects trees limited by ACLs.
When this option is not empty, the DokuWiki default index is replaced with a custom page, which for example contains the indexmenu tree of your site.
Set this option with a DokuWiki page ID (i.e: tools:index), then create the page (i.e: tools:index) and put inside it an indexmenu syntax like this:
{{indexmenu>..|js navbar nocookie}}
You may also want to hide this page in any indexmenu trees with the skip files option.
This option let you to globally hide namespaces (and their pages) in your indexmenu trees.
Just fill this option with the ids of namespaces to skip using Regular Expression.
Till V4.5, a namespaces full path has to be declared as a file system path (i.e.: “mydir/mysubdir”) instead of DokuWiki IDs.
There are also some issues About empty namespaces that should be read.
Simple examples:
Skip any namespace whose ID contains the word copyright or privatens:users. Attention: allprivatens:usersmich will be also matched
/(copyright|privatens:users)/
Skip the namespace whose ID is exactly myusers:spaces
/^myusers:spaces$/
This option let you to globally hide one or more pages in your indexmenu trees.
Just fill this option with the ids of pages to skip using Regular Expression.
Till v4.5, pages are checked as DokuWiki text files (i.e.: start.txt). A page full path have to be declared as a file system path (i.e.: “mydir/start.txt”) instead of DokuWiki IDs.
There are also some issues About empty namespaces that should be read.
From 3.1 release, message supports the wiki syntax, so it's fully customizable. Don't use HTML code.
You can show a custom message in place of the menu tree if it can not be rendered (i.e namespace doesn't exist):
{{ns}} is an alias for the requested namespace.
One useful empty message is$conf['plugin_indexmenu']['empty_msg']="<br><ul><li>No pages yet.</li></ul>"This makes the empty indexmenu look like a list (and therefore look closer in style to non-empty indexmenus).
It prevents no-admin users to insert indexmenu trees, removing every indexmenu syntax in the page. It affects only the edit mode, so that standard users are still able to view indexmenu tree in a page edited by admins. This is useful to deny to insert indexmenu trees to your users, but pay attention that if you let them to edit a page containing an indexmenu tree inserted by the admin, this tree will be removed as soon as a standard user saves the page.
If you sorted a page with the metadata tag syntax, a short blob message at the top of page will display its sort number.
The message is displayed only to wiki admins when they view the page.
The JavaScript tree menu is based on dTree code and is called with the js option.
Without theme option, JavaScript indexmenu will use the default theme.
Inside the Admin panel there is the option to download js themes to share your owns directly from my site.
To download themes directly into your DokuWiki server, you need that indexmenu images directory is writable by the web user.
You can also simply download a theme into your PC with the download link, and then manually install it.
You can create custom themes for every index rendered with the dTree menu.
Simply create a subdirectory, for example mytheme, inside indexmenu/images and put inside it your icons following the default theme scheme:
| Icon | Type |
|---|---|
| base.gif | Root Folder |
| folderopen.gif | Open folder without URL link |
| folder.gif | Closed folder without URL link |
| folderhopen.gif | Open folder with URL link (headpage) |
| folderh.gif | Closed folder with URL link (headpage) |
| page.gif | Page |
| plus.gif | |
| minus.gif | |
| nolines_plus.gif | |
| nolines_minus.gif | |
| minusbottom.gif | |
| plusbottom.gif | |
| join.gif | |
| joinbottom.gif | |
| line.gif | |
| empty.gif |
Use your theme with js#mytheme syntax.
You can also customize a theme style by creating its own style.
The default icons file format is GIF, but PNG and JPG are also recognized. To use them in place of GIF, you have to name your theme directory with the appropriate image extension. For example: Mytheme.png/base.png.
An action menu is displayed when using the context mouse menu click (the right one in many cases). On Opera you can use the CTRL+left click to display it. When in editing mode, by default an “Insert as DWlink” item menu is added to the menu in order to insert the node DokuWiki link in your editing box.
A different context menu is loaded depending on anonymous, authenticated or admin users.
You can fully customize those menus by editing these files in the 'the indexmenu/jsmenu' directory:
| File | Loaded by |
|---|---|
| “menu.js” | anonymous user |
| “usrmenu.js” | authenticated user |
| “admmenu.js” | admin user6) |
To prevent to load the context menu, simply remove the indexmenu_contextmenu variable declared in the above menu files.
How to write utf8 chars, like èåäö, in the context menu file?
A solution is to encode them yourself: Find your char at http://unicode.coeurlumiere.com, replace the last zero of the left code by the character in the upper row and prepend the result with \u : i.e. \u00E3 for 'ã'
You can edit the style.css in order to globally customizing the tree menus style. Some styles are:
| Tag | Comment | Mode |
|---|---|---|
| a.nodeFdUrl | Namespace with URL link (headpage) | js |
| a.node | Namespace without URL link | js |
| a.nodeUrl | Page | js |
| a.nodeSel | Previuos selected page or headpage highlight | js |
| a.navSel | Current page highlight | js |
| a.indexmenu_idx_head | link style of a namespace with URL (headpage) | nojs |
| a.indexmenu_idx | link style of a namespace without URL | nojs |
| .indexmenu_arrow | The scrolling arrow area | js |
| .indexmenu_toc | The toc-preview area | js |
If you want to apply a different style from the global one to a js theme, you need to create a style.css file like this inside the theme directory you want customize and use its name as subclass.
/*Custom style for the thread theme*/ .dtree .thread{ font-family: Comic Sans MS; } .dtree .thread a.navSel { background-color: #000; color: #fff }
Follows these instructions:
If problem still persists, please, report the bug with details of your configuration in bugs section.
Note: Make sure to save the page. The JS tree will not if you only preview the page (at least for me) I can't reproduce this bug, for me indexmenu works on preview too. One reason could be the Firefox bug that I wrote about in the bugs section. Could you check the JavaScript console for errors? — Samuele Tognini 2007-03-09 16:46
If your site contains a large amount of pages, and you're using indexmenu as a navigation sidebar, you could notice random slowdowns in the page loading. This happens when cache is purged and the whole indexmenu tree has to be rebuild.
To avoid this problem you may use the max option, which rebuilds only a single tree portion (sublevel) and enable AJAX for further user-requested sublevels.
These new sort options (tsort, msort, nsort) are fantastic! Just wondering if there is a way to change the defaults, so that if nothing else is specified, a certain set of sort parameters are used automatically. For example, we have a wiki where we will always use the msort tsort nsort options together (in every instance of indexmenu). So instead of defining something like:
{{indexmenu>.|msort tsort nsort}}
100 times, we could just say:
{{indexmenu>.}}
This would make things easier for rookie editors, and ensure consistency. Just curious if it's feasible in some way.
Cheers! —Ryan Jacobs 2008-03-01
Currently there is no way to set these defaults. To force them (but then there will be no way to unset them), you should hack the 'syntax/indexmenu.php' handle function:
$match = substr($match,12,-2); + $match .= ' msort tsort nsort';
— Samuele Tognini 2008-03-03 23:44
Thanks, that's exactly the kind of detail I was looking for. I know it's a “hack”, but in some circumstances consistency will be more important than heaps of options for every instance of indexmenu.
Thanks! —Ryan Jacobs 2008-03-04
I have in my sidebar the following code
{{indexmenu>..#1| js navbar id#random }}
and I get after saving this message: Indexmenu ID conflict
What's wrong????
The IE also doesn't remember tree state after open a page With Firefox it worksģ
A conflict happens when there are two indexmenu tree with the same ID in a web page. If you're using only one indexmenu with the below syntax then it could be a cache issue. Have you tried with the The tree is not displayed steps? Let's continue this discussion here but, please, next time report bugs in the appropriate bug section. — Samuele Tognini 2008-02-20 17:33
I forgot to say that this obviously happens when you are editing your site sidebar page, too. In this case you get the same indexmenu object in both page and sidebar and the conflict is detected. — Samuele Tognini 2008-02-25 13:05
Thanks. I have tried it with The tree is not displayed, but with IE indexmenu doesn't remember the tree state after open a page. The theme shows a open directory with the minus but all the tree's are still closed —Werner Stoiber 2008-03-07 14:20
Could you try the development release (after installed, purge the cache following The tree is not displayed steps)? If nothing change, could you send me you site URL so I can test it? If it's not public accessible, a screenshot could help. — Samuele Tognini 2008-03-07 18:34
I've tried the development release. with the same result. I've sent you the screenshot with mail. Thanks Werner —Werner Stoiber 2008-03-19 12:45
It took me some extra explanations from Samuele to get that : ID conflict will always occur as long as sidebar AND index are the same page. To avoid it, make a page for index, and another one for sidebar (even if they have exactly the same content
) — NewMorning 2009/02/11 22:45
Or there is a simple solution: add ~~NOCACHE~~ to that sidebar page and the error message will be gone for good.
I don't suggest to use the NOCACHE command for this issue. Without cache your site performace could slow down depending on the amount of you tree pages. Having two differents pages, one for the sidebar and one for index, is faster (becasue of the cache improvements) and more customizable.
Yes, You can sort pages with the tsort, dsort or msort syntax options. To sort namespaces you need to add the nsort option to previouses.
If you want to replace the default navigation with sidebar, please note that you
a) need a template that actually has some sort of “sidebar”
b) probably need to set the “page that's used as navigation” in the template config and put inside that page the indexmenu syntax , for example for 'dokubook' this is:
$conf['sb_pagename'] = 'wiki:navigation';
I would like to have the indexmenu on the left side (similar to the default “table of contents” on the right). On Samuel's Playground-Page is a very fine example of what I mean. I mean the box on the left-side with the title “DokuWiki”. When I view the source-code it is<div class="left_sidebar">Where do I have to edit my stylesheets to activate this on each page? 2007-02-06 10:51 CEST(Austria) Mark
Indexmenu itself does not provide sidebars, but you need a template that supports it. You can find them in Template page. I suggest you to look for a template that uses a page as sidebar, so that indexmenu loading will be faster thanks to DokuWiki cache. Mine is the artic template. — Samuele Tognini 2007-02-06 11:58
do you mean Arctic (because I found no “artic”)?
Yes
ok, thanks a lot, now it works; I used sidebar template and the I created a page called “sidebar”# my page "sidebar" has only this entry: {{indexmenu>.|js#kde.png navbar}} # in conf/local.php # I added the entry $conf['template'] = 'sidebar';I use the KDE-theme; it looks really great! 2007-02-07-09:48 CEST (Austria) markjackson
Question from Jen: Is there any way to create this sidebar functionality for only part of a wiki site? In other words, I only own a particular directory/namespace and would like to use the indexmenu sidebar, but I cannot change the global conf/local.php.
Sorry but you can't, at least only through indexmenu, because it does not provide sidebar functionality. Sidebars are provided by templates, and only administrator can manage them.— Samuele Tognini 2007-04-04 11:45
One more question? Where does the sidebar page go?
Thanks, Jen
It depends on template. For example, the arctic template lets admin to choose any wanted DokuWiki page as sidebar.
New question: Editing the sidebar page displays the sidebar tree as links in wiki syntax. I created a sidebar page, switched from the WYSIWYG editor to the wiki syntax editor and placed the following line:
{{indexmenu>.|js#kde.png navbar}}.
Saved the page. When I press Edit this Page, I see the menu in the WYSIWYG, instead of switching automatically to the wiki syntax editor.
You should provide me a link to the WYSIWYG editor you are reporting about so I can test the problem. And, please, use the bugs section for indexmenu bug issues.
2007-02-05-07:44 CEST
I have installed indexmenu, but every time I want to use it there is the following error:
Fatal error: Call to undefined method syntax_plugin_indexmenu::getConf() in /<PATH TO MY WEBSPACE>/dokuwiki/lib/plugins/indexmenu/syntax.php on line 143
any solutions or ideas?
Mark Jackson
What DokuWiki version have you installed? Look at dokuwiki_2003-09-03 indexmenu release (no more developed) for old versions.
thanks for this pointer! I had the version 2006-03-09e; now I installed 2006-11-06 and it works!
2007-02-05 10:34 CEST Mark
| :!:From indexmenu v3.3, the tree is always immediately updated. So you have not to worry to use ~~NOCACHE~~ instruction, it's not useful and slows down the page loading. |
But in older versions when the requested main namespace is not the root, then internal DokuWiki caching mechanism implies that the rendered tree and the namespaces titles could not be updated when you modify a page or create a new one inside that namespace until the server cache is purged.
To purge cache either wait for the automatic purge cache time expiration or force it through a purge=true request on the page that contains the indexmenu tree.
You also might try the ~~NOCACHE~~ instruction to completely disable a specified page cache, so that you have no more to worry about purging cache. But pay attention that it could slow down the overall loading process of the page depending on the number of tree nodes.
Every js indexmenu has an ID (randomly generated by default) used by cookies to remember the current tree state (the selected, open and closed nodes). When the page cache expires or is purged, this information are reset because a new cookie (and consequently a new id) is generated.
This is not a problem because cache purge is not frequent, but if indexmenu is called inside an uncached page or directly inside PHP code, every time user loads the page, indexmenu behaviour is to not remember is previous state just like when nocookie is defined.
In this case, the solution is to force a permanent ID through the id option. Id can be any number or the string “page”. The last option is used in rare case, because it will generate an ID based on the current page. It's important to have unique ids in your site because two menus with the same ID will interfere one each other when user open or close nodes.
Create your own arrow in GIF format with an image editor, then override the default one in dokuwiki/lib/plugins/indexmenu/images/scrollleft.gif.
Change the height and width of the .indexmenu_arrow property in the Css Style according to the size of your image.
You could need a browser cache purging.
Indexmenu tree behaviour depends also on the sneaky_index option in this way:
In both cases, unauthorized pages are never showed. There are also some issues About empty namespaces that should be read.
This namespace behaviour in presence of ACLs can not be changed until it's not changed in the DokuWiki core itself.
Example:
+-Mysite (ns) (allowed)
+-private (ns) (denied)
+-ppublic (ns) (allowed)
-ppstart (page) (allowed)
-pstart (page) (denied)
+-public (ns) (allowed)
-linux (page) (allowed)
+-public2 (ns) (allowed)
-secret (page) (denied)
-start (page) (allowed)
-start2 (page) (denied)
Enabled will display:
+-Mysite (dir) +-public (dir) -linux (page) +-public2 (dir **displayed only in case of any sort option**) -X (empty/unauthorized icon **displayed only in case of any sort option**) -start (page)
Disabled will display:
+-Mysite (dir)
+-private (dir)
+-ppublic (dir)
-ppstart (page)
+-public (ns)
-linux (page)
+-public2 (dir **displayed only in case of any sort option**)
-X (empty/unauthorized icon **displayed only in case of any sort option**)
-start (page)
conf/local.conf:$conf['sneaky_index'] = 0; |
Empty namespace can occur when:
In presence of an empty namespaces, indexmenu will show a node child icon, representing an empty page, when any of the syntax sort options are used or when the max option is configured and the node has to retrieve its children through the Ajax request.
Why do you need a sort option to correctly hide empty namespaces? Because the sort option calling replaces the faster, but less featured, core DokuWiki search with the slower, but more featured, indexmenu search.
| Only for 2006-03-09 DokuWiki version. Not needed in the 2006-11-06 version. |
To avoid indexmenu JavaScript code in RSS feed in order to get it readable, edit the dokuwiki/feed.php file at line 217, inside “cleanDesc” function, and add this line:
//remove TOC + $desc = preg_replace("!<div class='dtree'>.*?</div>!s",'{{indexmenu code}}',$desc); $desc = preg_replace('!<div class="toc">.*?(</div>\n</div>)!s','',$desc
The text used for the nodes in the tree is retrieved from DokuWiki's metadata store. DokuWiki uses a background process triggered by a web-bug to updating this metadata.7) If you added wiki pages/namespaces via the filesystem (rather than creating them in DokuWiki,) and that page/namespace has never been viewed, the metadata will not have been generated.
| For general usage questions and support request not covered in the faq and notes section, go in the discussion page. |
| Solved Bugs are moved in oldbugs discussion page. |
settings:
{{indexmenu>:#2|tsort nsort js#thread id#3 notoc nopg}}
When browsing a page the menu shows with the correct symbol for uncollapsed, but the subtrees are not shown. When clicking twice the tree opens and the subfolder is highlighted. (deshi 20.5.2011)
I'm using the metadata tags to order my namespace.
Here's the tag on my page index: http://mpkb.org/home/2233
{{indexmenu>..:home#1|max#1 js msort}}
However, the pages are not showing up in order when I use the metadata tags as I would expect. To give you some example, here are the tags I'm using for a couple pages and how they show up in order:
-Home |_Diseases (indexmenu_n>20) |_Symptoms no tag |_Laboratory Tests (indexmenu_n>1)
- Paul Albert, October 4, 2010
Please add the “nsort” option and let me know if something has changed.
It seems that a severe bug of Firefox, under some circumstances, corrupts cached JavaScript files so that a no-js tree is displayed in place of tree one. Purging browser cache solves it. Other browsers are not affected by this bug. Latest indexmenu releases seems not to be affected by this bug.
indexmenu uses a colon as a namespace separator, but on my Windows-Server DokuWiki only works correctly with a slash as a separator. Is it possible anyway, to change the namespace separator in indexmenu? –Thomas
Do you mean the URL namespace separator? Last version should work with it, but you need first to activate the URL rewriting in the DokuWiki configuration. The variables are userewrite and useslash.
Yes, I mean the URL namespace separatorrewriting is activated and also useslash. But I handled the rewriting by ”.htaccess”. If I set it to “DokuWiki” also indexmenu handles the URL. But I want to use htaccess, cause of nicer URLs. Is this possible anyway? –Thomas
DokuWiki userewrite option has also the “htaccess” value. Does not it work (don't forget to set the sepchar)? A workaround is to change these settings in the indexmenu syntax.php as you need:
$out .= "$js_name.config.urlbase='".wl()."';\n"; $out .= "$js_name.config.sepchar='".idfilter(':')."';\n";
Feel free to email me to get support.
using version 2008-01-04 (as indicated in VERSION.txt) and headings as titles.
if a page inside namespace has the same pagename (but not title) as the namespace, this page does not appear in the indexmenu tree. for example, if I have two pages, test/test and test/a, test/test is not visible in the indexmenu tree. — rich 2009/08/17 10:19
If test/test is an headpage and the indexmenuhide_headpagesetting is on than it's not a bug. To display it you need to disable thehide_headpageoption or to change theheadpageoption. Read the Namespaces title and link (headpages) section for info. Otherwise please report if the bug persists in the development release. — Samuele
But it's a bug if the page 003 is not shown in the namespace 03, e.g. logs:03:003 or logs:02:002… — Faux 2010/04/10 18:33
Working on Linux RedHat 4, the two buttons in the menu never appear (But I can still click on the button, even though they're just one pixel large). I tried to change the path to the pictures, but nothing did the trick. Do you have any idea about the cause?
This is not the current indexmenu stable release, could you upgrade it and check if bug persists? If it persists, adding this code in the style.css inside indexmenu directory overrides your theme CSS and forces indexmenu buttons to be large enough (works only in the current indexmenu stable release):
.indexmenu_extratoolbar button, .indexmenu_jstoolbar button { width:20px !important; height:20px !important; }
or ,if the problem is the button images size:
.indexmenu_extratoolbar img, .indexmenu_jstoolbar img { width:16px !important; height:16px !important; }
and don't forget to purge browser cache. — Samuele Tognini 2009/10/12 15:26Hmmm, now it's worse. I upgraded and there is nothing appearing when clicking on the toolbar button. :S
If it's possible to add just a little text next to the picture to click on it, it would be nice. I don't know enough about JavaScript myself, but I guess it is not so hard. I just need something to click on, and I guess there would be less problems with just text.Um, did you purged your browser cache as I recommended? Adding text could not be a solution. If the problem is your theme CSS that disables indexmenu button display or sets a small size for them, the text will also not appear or will be truncated. The better way to check this on your own is to use a web developer tool like the Firefox extension firebug.No, the problem isn't the CSS. I modified the dimensions of the buttons, so I can click on them easily, but they still don't appear. I guess JavaScript fails to load them at some point, but I don't know why. Can you just tell me how I can add text next to the picture, so I'll try it and tell you what it do. I'm pretty sure the text will appear correctly. See this picture:I'm able to 'see' the button when I give it some dimensions, but the picture can't be loaded.
Override edit.js with edit-full.js, then add the code below comment at line 63:
btn = createToolButton(theme_url + adata[key]+'/base.'+indexmenu_findExt(adata[key]),adata[key]); btn.className = 'pickerbutton'; //Add this line btn.innerHTML += "YOURTEXT";
Please, if you don't find a solution, continue this discussion via email that is more appropriate way to solve bugs — Samuele Tognini 2009/10/12 17:18.Further inspection brought to conclusion that it was a bug already fixed in current stable release, that persisted because of unpurged cache. Following steps in the_tree_is_not_displayed is sufficent to solve this issues. — Samuele Tognini 2009/10/13 18:43
I use indexmenu very usefully. Thanx very much. I'm Korean. My wiki is here.I just used indexmenu like this
{{indexmenu>:#1|js}}
It works very well. I love this system. But My wiki pages grows and I spend loading time more than before. So I want to use max option like this
{{indexmenu>:#1|js max#1#1 nocookie navbar}}
But, it doesn't work. like this screenshot.
Menu tree failt to get sub namespaces and pages.
I test it another wiki. Then, I know problem is Korean Namespace and Pages. I think max option somthing wrong with multi-byte namespaces and pages.
Please check it. If you need test-bed, use here : http://nex32.net/dokuwiki/playground:playground
please replace the line:
$ns=$idxm->_parse_ns($ns);
with:
$ns=$idxm->_parse_ns(rawurldecode($ns));
in the ajax.php file inside indexmenu directory. Make some tests before to report a feedback. — samueleSamuele
samuele
2011/01/21 16:58
I tested your patch. It works perfectly! Thanks very much Samuele! erialerial
I'm trying to display the contents of a namespace, without displaying subnamespaces. I want to sort alphabetically by page name, but have a few special pages show up on top. To do this, I've used the indexmenu_n syntax on a few pages. I'm using these parameters: “page#0|nons msort.” I want a single-level list, so the “js” option won't work for me (too many icons and stuff).
So first, you can't sort both alphabetically and by meta data, because msort and tsort are incompatible (tsort always wins). I can live with that.
Second, the pages with meta data always show up at the end of the list. I want them at the beginning. Any way to do this?
Finally, when I use msort and nons together, the headpage shows up in the list (with the custom name “sidebar”), even though I have the “Hide headpages” setting turned off.
Any help would be appreciated. Should I be using indexmenu2 or something?
IT SEEMS IT WORKS GREAT WITH RINCEWIND!!!
Well, but not at all. There are ome features which does not work. For example if you have namespaces or pages with limited access, you could not see them in indexmenu use Rincewind. With Anteater there was no problem. Let's have a look a the discussion page , too. — SteReSteRe
Markkleeberg (nahe Leipzig) 2011/11/18 12:52
There seems to be a Problem with RINCEWIND: The Menu does not open to the current Page displayed. So my tree is always closed, before update to rincewind it worked fine. I am using the 29.08 release of indexmenu, cleared cache, did a purge and everything that is mentioned in the troubleshoot section, with no difference. Current page is not shown in indexmenu … :( This seems to only happen with the js Version. The non js Version seems to work ok.
Please, use the discussion page for feature requests and general discussion.
Old discussions are archived in the olddiscussion page.