DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:indexmenu:discussion

« indexmenu

Read before post

:!: Before opening a discussion, check if it's already covered in this page (the TOC on the right side is a good and quick way to find them) or in the faq and notes section.
If you think that you have discovered a bug, report it, with details, in the bugs section.
This page is only for feature requests or general indexmenu discussion.

You can find old discussions in the olddiscussion page.

Theme downloads

Is there a URL for downloading themes? I can see different ones exist here http://samuele.netsons.org/dokuwiki/doku.php?id=playground:playground and the doc says “Inside the Admin panel there is the option to download js themes from my site”, but the server I'm running DokuWiki on doesn't have internet access. I've looked all around this site but can't find the downloads! Thanks.
RNM 2009-06-19

You can find cached versions in the theme repository. Be aware that some theme could not be present or updated until someone requests them with the DokuWiki “Indexmenu Utility”. — Samuele Tognini 2009/07/06 13:39

Tip: fold-down indexmenu

Indexmenu works a treat with the folded plugin. Indexmenu is initially concealed, but on clicking the title, the menu will fold down.

Use syntax such as:

 ++++site navigation|{{indexmenu>home#1|js navbar nocookie}}++++

To have the indexmenu (and other folded content) fold out over the page (rather than into the document flow) change the following style rule in the style.css for the folded plugin to:

div.folded {
    position: absolute;
    background-color: __white__;
    padding: 0.5em;
    border: 1px dotted __medium__;
}

Green Box 2007-02-24 05:24

Incompatibility with npd plugin

This plugin doesn't work well with the npd plugin to create new pages as the npd plugin attaches events to the standard index tree of DokuWiki instead of the indexmenu tree. Would it be possible to disable indexmenu in the 'new page' window the npd plugin creates, in order to have the standard index tree working in only that window? 2009/16/04

What are the steps to reproduce the npd bug? For what I see with my quick test, ndp opens a new windows with his own working index that does not affects the indexmenu one. — Samuele Tognini 2009/04/19 02:39

In my wiki I see the indexmenu index in the npd window not the standard index. As soon as I remove the indexmenu plugin the npd window starts working fine. It seems the init_index JavaScript function of npd doesn't understand the indexmenu syntax.

Did you enabled the replace_index indexmenu option? The following patch should fix it:
diff -rN -u old-indexmenu/action.php new-indexmenu/action.php
--- old-indexmenu/action.php    2009-05-08 11:02:48.000000000 +0200
+++ new-indexmenu/action.php    2009-05-08 11:02:49.000000000 +0200
@@ -128,6 +128,7 @@
    */
   function _loadindex(&$event, $param) {
     if ('index' != $event->data) return;
+    if ($_REQUEST['npd']) return;
     if (!file_exists(wikiFN($this->getConf('page_index')))) return;
     global $lang;
     print '<h1><a id="index" name="index">'.$lang['btn_index']."</a></h1>\n";

Left/Up/Right navigation for books

Hey folks - thanks for this terrific plugin. I am involved in a project to produce a book using DokuWiki - and we are 80% there. Right now we have manually inserted left/right arrows at the bottoms of pages to move to the previous or next page in the book. This is silly since the arrows become part of the document which we don't want for printing etc. My thought is that indexmenu, which we are using in the left-hand navigation in the monobook template, seems the tool for the job for this. Would it be possible? I'm thinking something simple and intuitive that shows the titles of the previous and next page in the book - like on a WordPress blog like this example. — Tobias Eigen 2007-03-21 15:19

I think that indexmenu is not good for this, because it's main purpose is to show trees and not navigation arrows. Probably the best solution is to write a new plugin. Anyway, I see that in DokuWiki forum you could have found a solution.
One advantageous thing that indexmenu provides is an ordering of pages in a namespace (be it via titles, msort, etc…) which is then used to build the tree. Since the same information (previous, next, up, childs) has validity for a “book navigation” system I think it could be plausible to make indexmenu provide a list of pages, via JavaScript or a PHP variable, as if it was a helper plugin. From there, it would be possible for anyone very interested to create a plugin that requests the information from indexmenu. – — Luis Machuca Bezzaza 2009/10/09 18:29
Yes, it's a long time that I'm thinking to implement an helper plugin (for example to easily solve the navigation feature request). I'm still too busy for a short-time implementation, but this is in my priorities. — Samuele Tognini 2009/10/10 19:26

Alphabetized under a certain letter

I would like to be able to make different index menus in a way that I choose what namespaces to skip. I can't do that since the config is only for all indexmenus in general.

my ultimate goal was to create a “menu” in which I can have everything alphabetized under a certain letter that will unhide a div containing and indexmenu without having to create a new namespace.

example:

A
 \apple
 \arch
B
 \bill
 \brat

Can someone suggest something I can do???

Take a look at the alphaindex plugin. It lacks the effects of a JavaScript tree, but it could be sufficient for your goal. If your pages were already sorted inside alphabetical namespaces, you'd able to reach your goal using the inline_folding2 plugin. Something like that:
A ++++
 {{indexmenu>A| nons}} ++++
++++ B |
{{indexmenu>B|nons}} ++++
...
Samuele Tognini 2007-10-05 21:42

Mix namespaces and pages when sorting

I would find it very useful to have greater control over the sorting of namespaces and pages. What I would like to achieve:

Menu
-NS1
-Page2
-Page3
-NS4
-Page5

Of course it would be nice if it was possible to do this for all sorting options, but the most important, at least for me, is msort so that I can order pages myself.

Erik H 2008-04-16 00:35

Why mix, at the same tree level, pages and namespaces? It should be hard to implement and at the moment I don't see a valid reason for this. I think of indexmenu as a sort of filebrowser and filebrowsers don't mix directories and files when you sort them, aren't they? — Samuele Tognini 2008/04/25 01:00
I too would like to sort namespaces within pages. Which files from indexmenu would need to changed? I'll take a look… — Keith Edmunds 2010/09/23 20:43
At the moment we are using DokuWiki to document the functionality of our software. In this, we sometimes need the ability to create a 'subpage'. We achieved this by creating a namespace and a headpage for the particular namespace. This works well with Indexmeny as well, but we have the same problem, we would like the namespace to be mixed between the pages. Let me give an example:
Software User Manual
|
|- 1.0 Installation
|- 2.0 Configuration 
|  |-2.1 Global Configuration
|  |-2.2 User Configuration
|  |-2.3 Exporting/Importing Configurations
|-3.0 Uninstalling

Above is the logical order of how it should be, however indexmenu always moves 2.0 Configuration to the top as it is a namespace. So we too would really like to have this feature. Is there anyway we could be of use? Kulendra 'KJ' Janaka 2011/04/05 12:00

I second this request. Kulendra's use case closely mirrors mine. Sometimes a chapter in a document should be a single page, and sometimes it's helpful to break it up into multiple subpages. – Chris Sutton 2012/08/02

Completely. It would be very useful for me as well. It is needed when the index is used as, well, an index, as in a book index, where some of the items have further subdivisions and others don't, regardless of their importance.

There's a workaround, although you'll have an empty folder working as a page:
- Create a headpage (say 'foo'). That would be the page you're trying to relocate.
- On the same level, create a namespace with the same name ('foo') and a dummy page inside it (say 'empty'). That folder will work as a the 'foo' page (which will show when you click on it), and will be otherwise empty in appearance.
At the config page:
- Tick plugin»indexmenu»hide_headpage. Now the 'foo' page won't show, but it will be displayed when you click on the 'foo' folder.
- Add the name of the dummy page at the config page on plugin»indexmenu»skip_file (something like this: /empty$/). Now you have an empty folder which you can order using msort or others.
- If you have more instances of pages you want to re-order, use the same name for all dummy pages, and they won't show in the index.

– Juan Mejias 2013/03/05

I've just updated from the old version 4.6 to the current 5.0. With version 4.6 pages and namespaces are mixed, with the new they are separated. I found https://github.com/samuelet/indexmenu/pull/111 which re-implement the old behavior. But it is still not merged into the source on github. Will his happen soon? — René Fertig-Bonacker 2016/06/29 13:39

Would it be possible to add the navigation feature of indexmenu2 to the indexmenu plugin?

The indexmenu2 plugin works fine, but I prefer some of the features in indexmenu. (I use the navigation feature to build indexes that are not related to namespaces.)

Tom T 2008-05-27 19:59

Syntax Format for navigation

Is there a option for allow the user to specify the navigation in Syntax Format like

<navigation | js#IndexMenu>
  * NS1
    * NS 1.1
    * NS 1.2
  * NS2
</navigation>

This option exists in indexmenu2. Is there a way to do it in indexmenu

Sorry but at this moment it's not supported. When I'll have more free time and more motivations I'll try for a solution. Duplicate of the navigation_tag_from_indexmenu2 discussion. — Samuele Tognini 2009/07/16 14:59
I implemented this feature with minimal invasion of the original indexmenu. You can read and download it from: http://www.ceng.metu.edu.tr/~ahmet/Mektep/index.php?id=mektep:plugins&serveplugin_help=indexmenu. — Ahmet Sacan 2009/09/20

changing indexmenu font colour

I tried to change indexmenu font colour only. — rich 2009/08/08 20:39

You need to add the !important declaration which prevents the parent overriding style. for example:
.dtree a {
  color: orange !important;
  text-decoration: none;
}
Samuele Tognini 2009/08/09 09:04
yay, it works - huge thanks :) — rich 2009/08/09 10:54

Tag Plugin Support

This would be great if you could integrate support for the tag plugin.

An example of the output could be something like this:

User Defined Title (Items Matching Tag1, Tag2)
-Page Name (Matching Defined Tags)
-Page Name (Matching Defined Tags)
etc.

nojs: How make all namespaces always switching open/close by clicking?

How can I change the indexmenu so that all clicking on namespacelinks opens or close that part of the tree in the nojs mode? Now only when nonexist a headpage in that namespace you get this open/closing-function, but I like it open/close also when there is the headpage in the namespaces. Thus the same style as the Index uses. Can someone help me? — Klap-inKlap-in

2010/01/07 21:43

You can't. Headpages are not expandable just to permit to click and go to the corresponding DokuWiki page. I could look for a solution for the next releases, so any suggestion about this issue is well accepted. — Samuele 2010/01/08 11:19
I'd certainly like this to be consistent, as it stands it's rather confusing - click on a namespace that has a 'start' page and it opens the start page, click on a namespace that doesn't have a start page and it shows/hides the pages in the namespace. I'd like click on namespace to either hide/unhide the pages in the namespace (if there aren't any then do nothing) or open/close the start page (if there isn't one then 'create page' will appear).
I would also like this feature. Is there any way around using js to having the namespace formatted better. For example, I don't want “capture_devices” and “wireless_cameras”, it looks unprofessional, I'd want “Capture devices” and “Wireless Cameras”
Some hints:
- Solution for always open/close: when you don't like namespace nodes get links to the startpages, then you must disable all the options of the headpage setting.
- For using page titles in stead of page names, you need to set the useheading config setting to navigation or always. This config setting influence the whole wiki.
- For using page titles for namespace nodes you need to use the headpage option of the indexmenu plugin.
Klap-inKlap-in

2013/05/16 00:29
This way you also loose the names.. I managed this by changing this line ($item['hns']) ? $out .= “,'”.idfilter($item['hns'], false).“'” : $out .= “,0”; to $out .= “,0”; in syntax/indexmenu.php (line 548), thats for javascript menu.. it would be nice to introduce some extra tag I could put into my page like nolink which would tell the menu to take only the name from heading and not the link.. this would be really appreciated.. Petr 2015/01/12 19:45
In indexmenu.php change line 820 to
$tagid = "indexmenu_idx_head indexmenu_idx";

to allow opening and closing with a start page set.
Richard Ginzburg 2015-08-07 11:20

As I've got described in the DokuWiki Forum http://forum.dokuwiki.org/post/17408 I have dead links in the Indexmenu after I moved a page. Is there a way to clean up that entries? Cheers and thank you, David – crazydave 2010/02/17 15:39

I guess that pagemove plugin does not remove parent directory when a page is moved.
What happens in this case is explained in the first item at about_empty_namespaces.
Try to manually delete empty folders in your filesystem, purge the server/client cache and reload the indexmenu page. — Samuele 2010/02/17 16:12

Disable the Toolbar Button?

I'm using this plugin on just one page. I don't need the toolbar button and I'd rather not have my users see it. Is there any way to disable the toolbar button?

To disable the button in the toolbar of the edit window you need to uncomment /* */ this snippet
// try to add button to toolbar
if (window.toolbar != undefined) {
    window.toolbar[window.toolbar.length] = {
        "type": "Indexmenu",
        "title": "Insert the Indexmenu tree",
        "icon": "../../plugins/indexmenu/images/indexmenu_toolbar.png"
    }
}

Further sorting problem - how to sort namespaces?

Is there any way to customise the sorting of namespaces? I have a wiki with only namespaces at the top level and I want to sort them in a custom order rather than alphabetical. Is there any way of doing this?

When you apply the sorting options, these firstly apply to pages. When you add nsort these sorting will be applied to the namespaces too.
but how do you give that custom sorting number to a namespace which doesnt have a page? Am I missing something?

Permanent cookies?

Currently cookies expire at end of session. I would like to store my current indexmenu state permantenly. How to do this?

AlbrechtAlbrecht

30.12.2012

I recommend using localStorage. That way, data will be stored permanently, and there won't be a ton of cookies based to the server. – Ziothzioth
Zioth

2013-05-23

Hiding Pages from Menu?

I've looked through the docs and follow the examples within the Config Settings page on how to prevent pages from showing in the menu, but it's failing to work. Pages like “sidebar” & “Playground” continue to still appear even though I've use /(sidebar,playground)/ and /(sidebar|playground)/

Marshmarsh
Marsh

30.12.2012

I need to have all my folders in the navigation bar closed and when I open one of them and click on a page I need the page to be highlighted and be selected. The problem is that I cannot achieve that without setting the folder to be expanded from the beginning with indexmenu>.#1 .:linux|js#kde.png sidebar

If I click any other folder except from linux it does not work. How can I achieve this without having all of my folders expanded in the first place?

What if you use absolute page ids : instead of relative page ids .? — Klap-inKlap-in

2014-07-14

Listing pages before namespaces

I'm using the indexmenu without js and wonder if/how it is possible to show the pages of a namespace before the subnamespaces.

You can define the absolute path of your namespaces, or use a relative path e.g. ..: (one namespace higher), ..:..: (two namespaces higher) or ..:siblingnamespace (siblingnamespace is namespace beside current namespace).

Example which shows index of namespace above current one:
{{indexmenu>..:}}

Klap-inKlap-in

2013/12/17 23:38

Matchfile like Skipfile setting

Is it possible to add option for match only files or namepsaces with regexp. So the options could be (for example) matchfile[+|=]/regexp/ and matchns[+|=]/regexp/ and the plugin will only display files or namespace that respects the regular expression. Thanks.

+1
The only reason I am still using nspages plugin is its support for inclusion filter
marcinkmarcink

2016-02-18 21:11

Showing tree and ACL

Is it possible to show all the tree (namespaces/directories) in the menu when the only subnamespace is allowed in ACL? Currently the nothing is shown.

For example: I will see root→ns1→ns→ns3 in the menu when ACL is set to ns3 only.

Showing the first headline of the page

An option that causes display of the first headline of any page instead of the wiki ID would be very nice – AlbrechtAlbrecht

16.06.2014

Therefore dokuwiki has the global config option useheading.
Klap-inKlap-in

2014-07-14

Remove Metadata tag text

Metadata tag text defaults to “Indexmenu sort number: N”. It's enough to have just “N”. After the upgrade I have “Indexmenu sort number: ” excessive text. How to delete it so that not to do that over & over again every upgrade? – sancayaConstant Illumination
sancaya

25.06.2014

After I upgraded the plugin to the last version, I have that again:
“Indexmenu sort number: “
which I don't need because I know what the number means.
Please include the option to remove that.
It is excessive and ruins the layout of my TOC.
Thanks.
PS. I investigated – it's a problem of rewriting of lang.php file of the plugin.
Probably some mechanism is needed to avoid rewriting of custom changes. – sancayaConstant Illumination
sancaya

11.09.2014

Hide bullet graphic

Is it possible to hide the bullet beside a list when not using js?

Please add beginners' hints

It took some time to capture that the index manager only works when the user has created a page “sidebar” and add the appropriate code line in it. In the indexmenu documentation page the sidebar page is not mentioned at all.

Which option or configuration setting has to be changed to allow persistent display of multiple expanded different namespace branches when using a js menu?
If you expand a namespace and click on a page node therein to display it, then expand a second namespace and click on another page node in the second namespace to display it, the first namespace branch that was open will automatically close and only leave the second namespace branch and its contents expanded. When jumping around between content in different namespaces it forces you to keep on expanding the tree over and over again. I am using the navbar option but it doesn't solve the problem?
My current configuration:

{{indexmenu>:#1|js#bw.png navbar tsort msort nsort}}

WvdW 16.10.2014

Popuptext when hover an entry in index

Is there a way to change the popup-text if someone hovers an entry in the index with the mouse cursor?

I'm using this plugin for my sidebar and if i'm hovering an entry a little textbox appears with the title of the page. It would be nice, if the popup has some text i could define on the page like

<indexmenu-description>add some description here</indexmenu-description>

I didn't found something on this FaQ or the indexmenu-docs.

Sorry for my terrible english knowledge and thanks for reply.

Ronny

translation-support?

I use the plugin:translation. And I use this syntax in my sidebar:

==== Deutsch ====
{{indexmenu>de#1|js#thread notoc navbar context skipns+/(playground|^wiki$)/}}
----
\\
==== English ====
\\{{indexmenu>en#1|js#thread notoc navbar context skipns+/(playground|^wiki$)/}}

It works. But what would be great if I could use a language-variable (see here) so indexmenu can use it and display only the actual language-tree. I have something like this in mind:

{{indexmenu>@TRANS@#1|js#thread notoc navbar context skipns+/(playground|^wiki$)/}}

Please help me to understand following descriptions

In the options table I can't understand the descriptions for “max” and “maxjs”:

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
  • What do you mean by “so that it will speed up the page loading”. Having a number greater than 1 will speed up loading or 1 is the fastest setting?
  • What do you exactly mean by ”, above all with an high amount of pages”? Who has a large number of pages? The wiki, the current namespace, or the page with indexmenu code?
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.
  • Here again I don't get what you mean by “loading of pages in DokuWiki with an high amount of pages”. How can pages contain pages? Do you mean namespaces?
  • I also don't understand what the first number (m) and second one (n) are

Sorry for my dumb questions. I'm really grateful for this plugin, but I also really have problems with some description.

Letters Color

  • The letters of the Main Page are in red color and the sub pages are in blue color.
  • But some new Main Pages are now in blue. What is the reason for that?

Hide Categories/Namespaces based on ACL

In a wiki with n number of categories (for example c1, c2, c3)and where most users only have read access to one of those categories; Is it possible to hide the namespaces in the tree structure that the user does not have read access to based on the ACLs?

The default situation seems to be that all the users who have read access to root see all the namespaces but not the individual pages inside those categories. I don't see any point in seeing namespaces that you don't have access to.

Inconsistency w/ core sneaky_index behaviour

It appears that the plugin is still displaying the name of namespaces that the logged-in user does not have access to. This, as I understand it, is the purpose of sneaky_index. Better behaviour would be to exclude these namespaces from the index when sneaky_index is on.

Please refer to doku documentation for sneaky_index: https://www.dokuwiki.org/config:sneaky_index

plugin/indexmenu/discussion.txt · Last modified: 2016-10-27 08:32 by 80.154.138.154