[[plugin: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 [[..:indexmenu#faq and notes]] section. \\
If you think that you have discovered a bug, report it, with details, in the [[..:indexmenu#bugs]] section. \\
This page is only **for feature requests or general indexmenu discussion**.
You can find old discussions in the [[plugin:indexmenu: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 [[http://samuele.netsons.org/darcs/indexmenu/images/repository|repository]]. Be aware that some theme could not be present or updated until someone requests them with the DokuWiki "Indexmenu Utility". --- //[[samuele@samuele.netsons.org|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__;
}
--- //[[greenboxster@gmail.com|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@samuele.netsons.org|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 [[..:indexmenu#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 '\n";
===== Context menu not showing =====
I have two installs of DokuWiki, one at home and one at work. Using the same theme (sidebar theme). My work install doesn't have the right-click context menu. I have looked through all the discussions, checked and compared settings of both installs, but for the life of me I just can't get context menu to show. I'm using the following configuration
{{indexmenu>..#1|js navbar nocookie id#random tsort}}
Help! --- //tyh 2009/12/02 16:30//
> Check for JavaScript errors in the Firefox error console after disabling the DokuWiki [[config:compress]] option. This helps to debug and to find what plugin (indexmenu itself or others) leads to errors that could prevent indexmenu to work correctly.
Have disabled compression of CSS and JavaScript from the config. When trying to right click on indexmenu tree I get the js error ''Use of getBoxObjectFor() is deprecated. Try to use element.getBoundingClientRect() if possible.'' Also there are also quite a few errors in css.php. Could it be my DokuWiki install or Firefox?
--- //tyh 2009.12.03 1040//
I tried using Google chrome browser to load DokuWiki page and right-click context menu works there! Think it's a problem with Firefox, but I'm using Firefox both at work and at home. Have tried clearing Firefox's cache, purging DokuWiki, but still can't get context menu to work.
--- //tyh 2009.12.03 1104//
> To correctly debug errors:
* Open the Firefox error console and clear all messages with the "Clear All" button
* Load an indexmenu page and check for error messages (not the yellow warnings, but the red errors)
* Errors messages should also display a link of js files with errors. Click it to go to the js code which originated the error. Report the file path and the code (trimmed if too long).
* Then clear again the error console and right click for the indexmenu context menu.
* Check for new error messages as in the above step.
Following the above steps, I get the following messages:
* Loading an indexmenu page
* Multiple errors with ''p.onStatusChange is not a function.'' Line 519 of chrome:%%//browser/content/tabbrowser.xml%%: ''p.onStatusChange(aWebProgress, aRequest, aStatus, aMessage);''
* ''Error in parsing value for 'cursor'. Declaration dropped.'' in doku.php
* Right clicking
* ''Use of getBoxObjectFor() is deprecated...'' (same as above) in doku.php
There's no errors with any .js files. The problem is with my Firefox. Checked with my colleague and indexmenu works fine in his Firefox. :(
--- //tyh 2009.12.04 1501//
> I can only suggest you to disable all the Firefox add-ons. If it works, try to enable them one by one in order to find the buggy one.
Have found the DokuWiki add-on causing this problem - All-in-one Gestures. After disabling this add-on, right-clicking shows the context menu for indexmenu :)
--- //tyh 2009.12.14 1216//
===== 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 [[http://www.saidia.org/2007/03/02/xo-man-sugar-and-spice-and-all-things-nice/|this example]]. --- //[[tobiaseigen@gmail.com|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 [[:devel:helper_plugins|helper]] plugin. From there, it would be possible for anyone very interested to create a plugin that requests the information from indexmenu. -- --- //[[luis.machuca@gulix.cl|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 [[.:discussion#syntax_format_for_navigation|navigation]] feature request). I'm still too busy for a short-time implementation, but this is in my priorities. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2009/10/10 19:26//
===== Headpage sort above in index=====
Every of my namespaces has a headpage (original called:start). This pages is between all the other pages. I like it shows up there, but I wish it is always the first of the pages.
-- Klap-in
> The next changeset adds an option ''%%hsort%%''. When this option is used each headpage gets the sort value equivalent to ''%%{{indexmenu_n>1}}%%''. So the headpage is always the first item of the index. Using msort overrules this again. --Klap-in
Index: trunk/wiki/lib/plugins/indexmenu/syntax/indexmenu.php
===================================================================
--- a/trunk/wiki/lib/plugins/indexmenu/syntax/indexmenu.php
+++ b/trunk/wiki/lib/plugins/indexmenu/syntax/indexmenu.php
@@ -125,4 +125,6 @@
//Directory sort
$nsort=in_array('nsort',$opts);
+ //sort headpages up
+ $hsort=in_array('hsort',$opts);
//Metadata sort method
if ($msort = in_array('msort',$opts)) {
@@ -153,4 +155,5 @@
if ($msort) $jsajax .= "&msort=".$msort;
if ($rsort) $jsajax .= "&rsort=1";
+ if ($hsort) $jsajax .= "&hsort=1";
if ($nsort) $jsajax .= "&nsort=1";
if ($nopg) $jsajax .= "&nopg=1";
@@ -175,5 +178,6 @@
'headpage' => $this->getConf('headpage'),
'hide_headpage' => $this->getConf('hide_headpage')
- )
+ ),
+ $hsort
);
}
@@ -247,10 +251,11 @@
$this->rsort = $myns[4];
$this->nsort = $myns[5];
- $opts = $myns[6];
+ $opts = $myns[6];
+ $this->hsort = $myns[7];
$output=false;
$data = array();
$js_name="indexmenu_";
$fsdir="/".utf8_encodeFN(str_replace(':','/',$ns));
- if ($this->sort || $this->msort || $this->rsort) {
+ if ($this->sort || $this->msort || $this->rsort || $this->hsort) {
$custsrch=$this->_search($data,$conf['datadir'],array($this,'_search_index'),$opts,$fsdir);
} else {
@@ -696,4 +701,5 @@
*/
function _setorder($item) {
+ global $conf;
$sort=false;
if ($item['type']=='d') {
@@ -704,4 +710,5 @@
if ($page) {
+ if ($this->hsort && noNS($item['id'])==$conf['start']) $sort=1;
if ($this->msort) $sort=p_get_metadata($page,$this->msort);
if (!$sort && $this->sort) {
switch ($this->sort) {
===== Edit Mode Behavior =====
We use indexmenu in our template, and it works great. See http://www.minifienixon.com/doku.php (in the dropdown on the right) for example. In our template, indexmenu persists in page edit mode. This request is to change the behavior of indexmenu in edit mode. Instead of navigating to the selected page (which makes no sense while editing) could clicking a pagename instead insert the selected page name as a standard DokuWiki link at the carat in the edit box?
--- //[[greenboxster@gmail.com|Green Box]] 2007-08-27 12:23//
>This is a good idea, but I'd rather prefer don't change the left click behavior. What about a right context menu with actions like edit/delete a page and insert the DokuWiki link when in edit mode? --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2007-08-29 22:09//
>Yep, right click menu would be fine. Insert DokuWiki link, edit, move or delete(if authorised), ACL?. Insert DokuWiki link would be the most useful. --- //[[greenboxster@gmail.com|Green Box]] 2007-08-30 03:44//
>> Ok, I'll work on it and I'll email you when a testing release will be ready :-) --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2007-08-30 21:33//
>>I've implemented a basic and customizable context (right) menu in the development release, you can try it also at my site. Soon I'll add an option in the menu to insert DokuWiki link in edit mode and, if not too much "expensive" in coding terms, to change the default link node action as you asked. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2007-09-15 12:42//
>>>Nice, Samuele. Let me know if you need some testing help. --- //[[greenboxster@gmail.com|Green Box]] 2007-09-15 13:36//
>>>> Yes, any testing and feedback, also via email, is always well accepted. About this feature, I'd be glad if you could test it on different DokuWiki themes and browsers (Ie7 and Firefox seems to work). Better use darcs (as explained in [[..:indexmenu#development]] section) to get an update indexmenu repository, but if you email me I'll send you a zip from last snapshot. Ah, the insert DokuWiki link option in the context menu is ready. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2007-09-23 12:27//
>>>>> I find this feature very good for wikis where the users aren't very technical! But I've found one problem, when I'm in editing mode and expand/collapse a level-1 namespace, I get the "Unsaved changes will be lost. Continue anyway?"-message, even though I'm not actually clicking a link to leave the page. In fact, it seems like the warning only appears for level-1 pages and namespaces. When I click a level-2 page I don't get any warning even though this time I actually leave edit-mode. ---- //[[erik@vindar.se|Erik H]] 2008-04-15 21:33//
===== 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 [[plugin: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 [[plugin:inline_folding2]] plugin. Something like that:
A ++++
{{indexmenu>A| nons}} ++++
++++ B |
{{indexmenu>B|nons}} ++++
...
>--- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2007-10-05 21:42//
===== hack JavaScript to skip the headpage in context menu for page creation =====
in context_menu.js, change "debut" and "DEBUT" with the name of your headpage, for example "start" by default.
This hack may be fixed by a more talented coder :!FIXME in the indexmenu plugin... just to no matter do the trick :
function indexmenu_reqpage(u,s,id) {
var r=id||prompt("Insert the pagename to create","");
if (r) {
u = u.replace(":debut", "");
u = u.replace(":DEBUT", "");
window.location.href=u+s+r+"&do=edit";
}
}
===== 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@vindar.se|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@samuele.netsons.org|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... --- //[[kae@midnighthax.com|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?
//---[[http://kulendra.net/|Kulendra 'KJ' Janaka]] 2011/04/05 12:00//
===== Possibility to specify pages to skip =====
It would be very practical if it was possible to specify pages and namespaces to exclude when adding an indexmenu to a page. Maybe like this:
{{indexmenu>.#1 | wiki | js navbar msort }}
Where the wiki namespace would be excluded. This is would allow for much more flexible use of indexmenu as navigation in sidebars. For example, it would be possible to use indexmenu both for as a lightweight navigational menu and as an index of all pages.
Maybe it's even possible to let us specify "mount-points" on different levels in the pagetree? That would be really awesome!
--- //[[erik@vindar.se|Erik H]] 2008-04-16 00:35//
===== tag from indexmenu2 =====
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_trenker@yahoo.com|Tom T]] 2008-05-27 19:59//
===== JavaScript translation =====
Is there any way to have **language files** for the **js context menu**? I am going to translate it to Spanish by hacking the /jsmenu files, but I would like to do in in a better way. Thanks
> No, I'm sorry but there is no such translation mechanism. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2008/09/22 22:24//
===== Startup hook script =====
I utilize YUI dialogs in some of my context menus. This means that I need to include a few external CSS and JavaScript files to be invoked once.
That is, I need to do this basically: (the functions loadCss and loadJavascript are my own functions that loads these resources into the head section of the HTML page)
loadCss('http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css');
loadCss('http://yui.yahooapis.com/2.7.0/build/button/assets/skins/sam/button.css');
loadCss('http://yui.yahooapis.com/2.7.0/build/container/assets/skins/sam/container.css');
loadJavascript('http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js');
loadJavascript('http://yui.yahooapis.com/2.7.0/build/element/element-min.js');
loadJavascript('http://yui.yahooapis.com/2.7.0/build/button/button-min.js');
loadJavascript('http://yui.yahooapis.com/2.7.0/build/container/container-min.js');
loadJavascript('http://yui.yahooapis.com/2.7.0/build/yui-dialogs.js');
This works great if I patch the init-function of indexmenu.js and insert the code there. But if I attempt to do this in each of the three jsmenu files instead it works in some cases, in others it doesn't. I guess it depends on in which order things are loaded...
I would greatly appreciate if a user definable script file could be added to indexmenu to be loaded by indexmenu once at startup. This new file could contain custom functions such as the above. What do you think?
Cheers
//[[urban@ottosson.org|Urban]]//
> JavaScript menu files should be the right places for this as they are really loaded once at startup on every DokuWiki page. I strongly suggest you to use [[devel:javascript#event_handling]] for your purpose.
> In details, create a single function which contains your above code (i.e: yui_function() ), then load it with the init event handler:
addInitEvent(function(){yui_function();});
> Just as a note, indexmenu already implements resources loading into the head section of a page. Check the "indexmenu_loadJs" function inside ''script.js'' and the "loadCss" prototype function inside ''indexmenu.js'', which needs to refer to indexmenu objects but let you to differ CSSs depending on JavaScript themes.--- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2009/07/10 10:01//
Perfect! I'll tried that and it worked great. Many thanks.
//[[urban@ottosson.org|Urban]]//
===== Problems with ACLs and subspaces =====
Hi, first, thanks for this great plugin. I have installed it in a environment with subspaces, permissions al LDAP authentication. Permissions work fine, but some namespaces the user does not have access are shown in the index menu. My conf. is this:
$conf['sneaky_index'] = 0;
$conf['plugin']['indexmenu']['aclcache'] = 'user';
$conf['plugin']['indexmenu']['headpage'] = ':start:';
$conf['plugin']['indexmenu']['page_index'] = 'sidebar';
$conf['plugin']['indexmenu']['skip_file'] = '/(sidebar)/';
$conf['useacl'] = 1;
$conf['authtype'] = 'ldap';
The ACL is this:
acerca_de @ALL 1
* @ALL 0
inicio @autentificados 1
playground:* @autentificados 2
clientes:client1:project1:* @sacyl%5fec 16
clientes:client1:project2:* @sacyl%5fldap 16
sidebar @ALL 1
interno:sistemas:city1:* @sistemas%5fcity1 16
wiki:* @autentificados 1
When a user that begins to sistemas_city1 logins, he also sees the clients namespace (but empty), although he has not permissions to access it, neither any if the subspaces. The same occurs with unauthenticated users, they also see clients and internal subspaces, but the shouldn't. Why does this happens? Can I fix it?
This is my sidebar.txt:
{{indexmenu>..#0 | js navbar tsort nsort noscroll nocookie id#random}}
Regards and thanks in advance.
> Please, read the [[plugin:indexmenu#about_acls]] section for solutions. This behaviour does not depend on indexmenu but on DokuWiki itself. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2009/07/16 14:59//
===== Page Above namespace =====
I would like to have a menu like this
Home
|_ Folder 1
|_ Folder 2
| |_ Page 2.1
| |_ Folder 2.2
| |_ Folder 2.3
That is the page is above the folder. Right now the indexmenu pages go below the namespace
> Sorry but you can't. Duplicate of the [[plugin:indexmenu:discussion#mix_namespaces_and_pages_when_sorting]] discussion. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2009/07/16 14:59//
===== Syntax Format for navigation =====
Is there a option for allow the user to specify the navigation in Syntax Format like
* NS1
* NS 1.1
* NS 1.2
* NS2
This option exists in [[plugin: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 [[plugin:indexmenu:discussion#navigation_tag_from_indexmenu2]] discussion. --- //[[samuele@samuele.netsons.org|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 =====
having latest DokuWiki and latest stable indexmenu, I tried to change indexmenu font colour only. I mucked around with style.css, trying all colour options - especially changing the _ _existing_ _ one. in the end, I couldn't get it changed, green colour was always used. the only way to get this change was to change _ _existing_ _ for the whole theme, which is not desired. as a non-coder I have to ask - how can I change font colour for indexmenu entries only? thanks. --- //[[richlv@nakts.net|rich]] 2009/08/08 20:39//
> You need to add the //[[http://www.w3.org/TR/CSS2/cascade.html#important-rules|!important]]// declaration which prevents the parent overriding style. for example:
.dtree a {
color: orange !important;
text-decoration: none;
}
> --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2009/08/09 09:04//
>> yay, it works - huge thanks :) --- //[[richlv@nakts.net|rich]] 2009/08/09 10:54//
===== Exclusion =====
the complete situation is that I have a lot of namespaces, but want to exclude one, to show it below, more prominently. I cant find how to exclude one namespace in the syntax, I'll first explain:
instead of
start
- 1
- 2
- 3
- 1
- 2
- 3
- 4
- 4
- 5
I would like to do the following:
start
- 1
- 2
- 4
- 5
3
- 1
- 2
- 3
- 4
I can find that it is possible to exclude a namespace, but I don't want it to be excluded completely
is there a way to reach this?
I hope that someone can help me, grtz Theo
>Try this: set the skip_index as follow:
>
/^3$/
>Or if you have other namespaces to skip (for example "mynstoskip"):
>
/(mynstoskip|^3$)/
>then use this indexmenu syntax, where "..." are your preferred options:
>
{{indexmenu>#1|...}}
{{indexmenu>3#1|...}}
>This should work. Take care that the skip_index affects all the indexmenu indexes of your site and the "3" ns will be displayed only when directly recalled as in the above second example. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2009/09/04 15:54//
>> Thank you!
>> In my case it worked, but I encounter a new problem; the maps within the namespace still are blocked, so when I have:
>> 3
- 1
- 2
-a
-b
- 3
- 4
>> the indexmenu skips "-2" and the pages a and b. Any idea how I get this back into the index?
>> Grtz Theo
>>> It should not depend on the above skip_index tip as it affects only the "3" namespace, and without more details about your site configuration is impossible to debug the problem. Possible causes are a reference to "2" in the indexmenu skip_index or DokuWiki [[config:hidepages]] regular expression, or the namespace is denied by [[..:ACLs]]. --- //[[samuele@samuele.netsons.org|Samuele Tognini]] 2009/09/07 17:26//
===== Tag Plugin Support =====
This would be great if you could integrate support for the [[plugin:tag | 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.
===== Request: quick way to sort headpages =====
Add a handy option to configmanager so you can set the headpage sort always above the list. Now you need %%{{indexmenu_n>N}}%% to arrange the headpage and I have to much headpages to add that manual.
===== Request: move pages and namespaces =====
Use indexmenu to move pages and namespaces. It would save a lot of time when tidying the wiki up.
===== Request: wrap tree nodes =====
When page titles are very long, and you don't use scrolling, the page titles are truncated. It would be nice if they would be wrapped to the next line with the correct level of indentation.
> Sorry but it can't be done without full rewriting the indexmenu code.
===== 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?
--- //[[gguitslaggREMOVETHISgmailDOTTcom|Klap-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@samuele.netsons.org|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).
===== Request/Question: Possible to limit number of items displayed? =====
Is it possible (or would it be possible to add) a way of limiting the number of items displayed? I want to be able to display the latest n articles. I.e. I want for example to show just the last 20 articles that have been changed. \\
===== How to clean up dead links?! =====
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 -- //[[david.walcher@gmx.at|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 [[..:indexmenu#about_empty_namespaces]].
> Try to manually delete empty folders in your filesystem, purge the server/client cache and reload the indexmenu page. --- //[[samuele@samuele.netsons.org|Samuele]] 2010/02/17 16:12//
===== Every namespaces or pages show the menu of their root namespace? =====
I have follow namespaces and pages
Root
├─ns1
│ ├─ns1.1
│ │ ├─pg1
│ │ └─pg2
│ └─ns1.2
└─ns2
├─ns2.1
│ ├─pg3
│ └─pg4
└─ns2.2
No matter in ns1、ns1.1、pg1、pg2 or even ns1.2, I want them to show follow menu
ns1
├─ns1.1
│ ├─pg1
│ └─pg2
└─ns1.2
so does ns2, in ns2、ns2.1、pg3、pg4、ns2.2, their menus should be:
ns2
├─ns2.1
│ ├─pg3
│ └─pg4
└─ns2.2
It means every namespaces or pages show the menu of their root namspace, is that possible?
I come from Taiwan and sorry about my bad English, hopes you can know what I said.
thank you.
--- //[[zero.arst@gmail.com|arst]] 2010/03/08 12:58//
> I guess you need the **context** option. Check the indexmenu [[..:indexmenu#syntax]] for additional info, this is a quick example:
{{indexmenu>.#1|js context}}
>>No, the result is not what I want. Let me try to explain again.
>>
Root
├─ns1
│ ├─ns1.1
│ │ ├─ns1.1.1
│ │ │ ├─pg1
│ │ │ └─pg2
│ │ ├─pg3
│ │ └─pg4
│ └─ns1.2
│ └─pg5
└─ns2
├─ns2.1
│ ├─pg6
│ └─pg7
└─ns2.2
>>In ns1、ns1.1、ns1.1.1、pg1、pg2、pg3、pg4、ns1.2、pg5, their menus will show the complete menu of ns1:
>>
ns1
├─ns1.1
│ ├─ns1.1.1
│ │ ├─pg1
│ │ └─pg2
│ ├─pg3
│ └─pg4
└─ns1.2
└─pg5
>>Thank you.
>>> Uhm, sorry but this is not supported. A different point of view could be to look for a plugin or template which differs the sidebar page depending on current namespace (like the [[template:multitemplate]] for templates) but I don't know if it exists. --- //[[samuele@samuele.netsons.org|Samuele]] 2010/03/09 09:29//
>>>>oh no~~I really love this plugin, hope further releases will support such feature.:-(
>>>>--- //[[zero.arst@gmail.com|arst]] 2010/03/09 16:22//
>>>>>After few days passed, I got a idea that maybe can achieves my request.
>>>>>I think I can add the follow code by modify the source code that every pages can be applied.
>>>>>
{{indexmenu>:%RootNamespace%|js}}
>>>>>%RootNamespace% means the root namespace of current page(not the default site root namespace:start)
>>>>>But after a few days tried, I still can figure out where is the source code that need to be modified, hopes someone can help me out.
>>I really want to do it on my wiki pages. now I'm using the markgard-gtopia-wiki template. I don't know if there's a way to do like it now.Can someone help me?
===== 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?
===== Problem with titles =====
I have problem with titles.
| category
| | something // Header=Smoething
| | - something pages
| - links // Header=Links
| - about
| - blaba
IndexMenu display only names of namespaces/pages (with all small letters), not first section title like here (with Big letters and spaces)
[[http://samuele.netsons.org/dokuwiki/doku.php?id=playground:playground#sort_pages_and_namespaces_by_title]]
What I should change to enable IndexMenu to view titles (first page header) instead of pages names?
Edit:
I found solution here:
* [[plugin:indexmenu#namespaces_title_and_link_headpages]]
* [[config:useheading]]
The trick is that useheading is a **GLOBAL DOKUWIKI** setting not related to indexmenu. Somehow, I overlooked that, and everyone else probably does too :(
**Question:**
//Could you please give some additional informations?
I set the variable 'useheading' = 1 in dokuwiki.php ("1 : use first heading text in all links", according to manual) but the directories still appear in namespace style (lowercases, no special characters)
//
===== Change the pass of indexmenu =====
there is a solution for indexmenu list attachments?
> What do you mean with "list attachments"?
===== Would it be possible to sort on Page ID rather than page name? =====
If I could sort on page ID then I can create pages 01, 02, ... 12 for the months January through to December and give them headings so the actually appear as the
month names in the indexmenu but are sorted in the correct order.
> I think indexmenu already sorts (by default) by page ID doesn't it?
>
> I have a similar/supplemental problem though, I'm successfully using a 'meta' sort to custom order
> some pages/namespaces but I want the rest to be sorted by page ID. This doesn't seem to work
> although the indexmenu documentation seems to say quite clearly that it should. My indexmenu
> entry is:-
{{indexmenu>.:..:..:#1|navbar context nsort msort}}
=====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?
=====Issue with Vector Template=====
I do not know if this issue is due to template or the plugin just wanted to register this
{{http://img703.imageshack.us/img703/5914/indexmenuvector.jpg?direct&200| Indexmenu in Vector template}}
{{http://img156.imageshack.us/img156/8198/indexmenu.jpg?direct&200| Index menu in default template}}
As you can see there is a border in the TOC (when we use the vector template) getting displayed which makes it un-readable in many cases. Is there any quick fix to this it will help.
Thank you.
Yndesai
>> Indexmenu Toc can be styled using the "indexmenu_toc" and "indexmenu_toc_inside" css classes. Supposing that the problem is a "border" attribute inehreited by the class, you could fix it for example adding in your site css files or directly in the [[..:indexmenu#css_style|indexmenu css file]] (in the last case, any plugin update will override your changes):
.indexmenu_toc .indexmenu_toc_inside *{
border: none;
padding: 0px;
}
>> remember to purge cache after changes following steps 4,5 described in [[..:indexmenu#the tree is not displayed]]. --- [[user>samuele]] //2010/12/31 14:24//
===== nojs: Highlight current page =====
Great plugin! One thing that I miss is highlighting the current page with the ''nojs'' option. But I was able to hack ''syntax/indexmenu.php'' in version 2009-08-29 (4.6) as follows to make it work:
/**
* Index item formatter
*
* User function for html_buildlist()
*
* @author Andreas Gohr
* modified by Samuele Tognini
* modified by Rik Blok to support highlighting of current page in index [2011-02-27]
*/
function _html_list_index($item){
global $INFO, $conf; // needed to highlight current page [Rik Blok, 2011-02-27]
$ret = '';
$navsel = $item['id']==$INFO['id'] || ($item['id'].':'.$conf['start'])==$INFO['id']; // is current page? [Rik Blok, 2011-02-27]
if ($navsel) $ret .= ''; // highlight if current page [Rik Blok, 2011-02-27]
//namespace
if($item['type']=='d' || $item['type']=='l'){
$link=$item['id'];
$more='idx='.$item['id'];
//namespace link
if ($item['hns']) {
$link=$item['hns'];
$tagid="indexmenu_idx_head";
$more='';
} else {
//namespace with headpage
$tagid="indexmenu_idx";
if ($item['open']) $tagid.=' open';
}
$ret .= '';
$ret .= $item['title'];
$ret .= '';
}else{
//page link
$ret .= html_wikilink(':'.$item['id']);
}
if ($navsel) $ret .= ''; // close highlight if current page [Rik Blok, 2011-02-27]
return $ret;
}
It simply compares each page as the index is being built to the current page and marks it as a search result if they match. --- [[user>rikblok|Rik Blok]] //2011/02/28 01:58//
===== ACL Problem =====
Hi, i've installed your plugin as left sidebar (menu.txt in wiki root) and granted users following permissions:
* @ALL 1
* @user 1
tis:* @tis 8
tis:* @ALL 0
wellview:* @ALL 0
wellview:* @tis 8
Permissions itself works fine (i.e. users in "user' group cannot access tis and wellview namespaces), but even unathorized users can see all existing namespaces in indexmenu.
My conf. is:
$conf['sneaky_index'] = 1;
$conf['plugin']['indexmenu']['only_admins'] = 1;
$conf['plugin']['indexmenu']['aclcache'] = 'user';
$conf['plugin']['indexmenu']['headpage'] = ':index:';
$conf['plugin']['indexmenu']['skip_file'] = '/(menu)/';
$conf['useacl'] = 1;
$conf['cachetime'] = 0;
This is my menu.txt:
{{indexmenu>..#1|js navbar tsort nocookie id#random}}
I've tried different acl_cache options, cleaned my browser cache, tried ?purge=true - still no change. What i need is: all unathorized users and users in "user" group musn't see "tis" and "wellview" namespace in indexmenu, it must be available only for users in |tis" group.
Can you give me an advice of what am i doing wrong? :)
===== Incompatibility with Rincewind =====
Indexmenu occurs with DW2011-05-25 'Rincewind'. Indexmenu doesn't work on Rincewind.
How can I make it work? --- [[user>erial|erial]] //2011/05/27 07:03//
Yeah, I like to know too
Yes, I also hope Indexmenu works in 'Rincewind'!
--- It worked for a while for my DW... seems I touched too many things now I'm troubleshooting why it has gone bad :( juanperiz AT yahoo DOT com DOT ar
===== Tree only expanding to level 6 =====
Indexmenu expands the tree only up Level 5 from the Root, but we would need levels 7-10 also to be displayed, as their names are really short. \\
Also setting max#3#1 or maxjs#10 doesn't solve the issue - under the 6th level the "Empty"-Icon is diplayed. \\
Can we somehow manage to set the maximum number of tree levels for the whole menu? --- //2011/09/02 10:12//
===== Incompatibility with Angua =====
The js Version does not open the indexmenu to the current page. It stays closed. Even telling it to expand one level per default does not work. This seems to only affect the js Version. The standard Version seems to work ok, except that it does not seem to expand beyond a certain level, which is a bummer also. Basically it is at this time of writing useless with Angua :(
> Try invalidating the Cache by touching config/local.php and/or doku.php, that fixed it for me.
> The only Problem I am havong is, that the TOC-Preview is moved about 300px up and left, so you can't really see from which Node you opened the TOC.
> --- //[[b.rosner@ovido.at]] 27.12.2011 17:37// \\
>> I managed to fix issue with TOC-Preview position:
>>
--- /srv/www/htdocs/dokuwiki/lib/plugins/indexmenu/script.js 2009-09-19 10:54:44.000000000 +0300
+++ /srv/www/htdocs/dokuwiki_ref/lib/plugins/indexmenu/script.js 2011-12-29 13:07:03.379880000 +0300
@@ -72,8 +72,8 @@
function indexmenu_showPicker(pickerid,btn){
var x = 3, y = 3, picker = $(pickerid);
if(picker.style.display == 'none'){
- x += findPosX(btn);
- y += findPosY(btn);
+ x += jQuery(btn).offset().left; //findPosX(btn);
+ y += jQuery(btn).offset().top; //findPosY(btn);
if (picker.id != 'picker_plugin_indexmenu') {
x += btn.offsetWidth-3;
} else {
>> While I had issues with TOC synchronization it has disappeared on itself. So probably related to caching.
>> --- //[[rogerdan@mail.ru|Denis]] 29.12.2011 15:25//
>>>Hi Denis - The Fix is working great, thanks for sharing!
>>>The only issue left is thar the right-click Menu isnt working anymore. --- //[[b.rosner@ovido.at]] 01.02.2012 13:14// \\
===== Excessive Tooltips =====
There is tooltip shown for each menuitem which is identical to the element itself. I think it is annoying and excessive. So I propose to leave ''title'' attribute empty:
--- /srv/www/htdocs/dokuwiki/lib/plugins/indexmenu/indexmenu-full.js 2009-09-19 10:54:44.000000000 +0300
+++ /srv/www/htdocs/dokuwiki_ref/lib/plugins/indexmenu/indexmenu.js 2011-12-29 14:42:01.192652000 +0300
@@ -102,7 +102,7 @@
str += '>';
if ($('dtree_'+this.obj)) {str += 'Indexmenu id conflict
';}
if (this.config.toc) {
- str += '';
+ str += '';
str += '';
}
if (this.config.useCookies) { this.selectedNode = this.getSelected(); }
@@ -169,7 +169,7 @@
str += ''+node.name+'';
}
Note that I renamed indexmenu-full.js to indexmenu.js to be able to edit it.
--- //[[rogerdan@mail.ru|Denis]] 29.12.2011 15:43//
===== Not compatible with hidden =====
Having this plugin installed means that hidden doesn't work (no folding occurs). I don't think this used to be the case, maybe it changed when I installed a new version of DokuWiki.
--- //[[shaklev@gmail.com|Stian]] 27.01.2012 12:40//
===== wiki sitebar/index webpage loads with errors in IE8/9 =====
Description: wiki page in IE does load but with following errors
Message: 'length' is null or not an object
Line: 1 Char: 23115 Code: 0
Message: Object doesn't support this property or method
Line: 1 Char: 12944 Code: 0
Details:
Template used: vector
plugin»indexmenu»page_index = :wiki:sitemap
this page has content {{indexmenu>..#2|js navbar nocookie id#random maxjs#2}}
tpl»vector»vector_navigation_location = :wiki:navigation
this page has content {{indexmenu>..#2|js navbar nocookie id#random maxjs#2}}
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; InfoPath.3)
**RESOLUTION:** in fact none, the root cause was a problem with [[http://www.dokuwiki.org/plugin:dokumicrobugtracker|DokuMicroBugTracker]], possibly there is conflict with some plugin. I also removed the //nocookie// option.
--- //[[martin.mosny@gmail.com|MartinM]] 3.02.2012//