DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:indexmenu

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:indexmenu [2024-01-09 00:33] – add group(nogroup) option 2a02:a44a:3b00:1:345b:52b9:d9f:f8b4plugin:indexmenu [2024-04-29 06:22] (current) – [Temporary multiple js trees] 45.78.57.234
Line 7: Line 7:
 type       : syntax,action type       : syntax,action
 lastupdate : 2024-01-05 lastupdate : 2024-01-05
-compatible : Elenor Of Tsort, Frusterick Manners, Greebo, Hogfather, Igor, Jack Jackrum+compatible : !Greebo, !Hogfather, Igor, Jack Jackrum, Kaos
 depends    : depends    :
 conflicts  : indexmenu2 conflicts  : indexmenu2
Line 22: Line 22:
  
 ===== Description ===== ===== Description =====
 +
 This plugin allows you to insert a fully customizable index or a list of pages starting from a specified namespace. 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]]. It should be useful in DokuWiki sites where pages are organized by [[:namespaces]].
Line 82: Line 83:
 Settings **before the "|"** separator: Settings **before the "|"** separator:
 ^Main ^Action ^Note| ^Main ^Action ^Note|
-^ //''ns''//     | //**Main namespace**// name. Index starts from here. Syntax complies with DokuWiki [[:namespaces#creating namespaces|namespaces]] paths.| "**.**" refers to the namespace of the page containing the indexmenu syntax and **not** to the current DokuWiki namespace context ((the namespace of the page displayed by a user who is navigating your site)) (see the **//context//** option for this feature). "**..**" or an empty value shows the root site namespace.|+^ //''ns''//     | //**Main namespace**// name. Index starts from here. Syntax complies with DokuWiki [[:namespaces#creating namespaces|namespaces]] paths.| "**.**" refers to the namespace of the page containing the indexmenu syntax and **not** to the current DokuWiki namespace context ((the namespace of the page displayed by a user who is navigating your site)) (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.| ^ //''#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#creating namespaces|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 ((the namespace of the page displayed by a user who is navigating your site)) (see the **//context//** option for this feature). "**..**" or an empty value shows the root site namespace. 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#creating namespaces|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 ((the namespace of the page displayed by a user who is navigating your site)) (see the **//context//** option for this feature). "**:**" or an empty value shows the root site namespace. Optional.|
  
 Optional settings **after the "|"** separator (separated by spaces): Optional settings **after the "|"** separator (separated by spaces):
Line 119: Line 120:
 The js option uses so far the JavaScript [[http://www.destroydrop.com/javascripts/tree/|dTree]] menu for displaying the pages. Unfortunately, this tree is not maintained and changes are needed. **The old js tree is deprecated.** It can be requested with the ''treeold'', if the default setting is changed. The js option uses so far the JavaScript [[http://www.destroydrop.com/javascripts/tree/|dTree]] menu for displaying the pages. Unfortunately, this tree is not maintained and changes are needed. **The old js tree is deprecated.** It can be requested with the ''treeold'', if the default setting is changed.
  
-To replace it, the JavaScript [[https://wwwendt.de/tech/fancytree/demo/|Fancytree]] menu is implemented. Use the option ''treenew'' to activate it. If the implementation appears to be stable, it will be come the default tree. You can already make it default by adding ''newtree'' to the ''defaultoptions'' setting in the Configuration Manager. +To replace it, the JavaScript [[https://wwwendt.de/tech/fancytree/demo/|Fancytree]] menu is implemented. Use the option ''treenew'' to activate it. If the implementation appears to be stable, it will be come the default tree. You can already make it default by adding ''treenew'' to the ''defaultoptions'' setting in the Configuration Manager. 
  
 ===== Examples ===== ===== Examples =====
Line 125: Line 126:
 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: 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:
 <code> <code>
-{{indexmenu>..#1|js navbar nocookie}}+{{indexmenu>:#1|js navbar nocookie}}
 </code> </code>
  
 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 [[.indexmenu#Metadata tag syntax|custom sort]] number: 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 [[.indexmenu#Metadata tag syntax|custom sort]] number:
 <code> <code>
-{{indexmenu>..#1|js#thread navbar max#3#2 tsort msort}}+{{indexmenu>:#1|js#thread navbar max#3#2 tsort msort}}
 </code> </code>
  
Line 186: Line 187:
 in this way: in this way:
 <code> <code>
-{{indexmenu>..#1|msort}}+{{indexmenu>:#1|msort}}
 </code> </code>
 <file> <file>
Line 200: Line 201:
 Pages without sort number, like the last three pages, are sorted by page name as default, but you can force a different sort: Pages without sort number, like the last three pages, are sorted by page name as default, but you can force a different sort:
 <code> <code>
-{{indexmenu>..#1|tsort msort}}+{{indexmenu>:#1|tsort msort}}
 </code> </code>
 <file> <file>
Line 274: Line 275:
 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: 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:
 <code> <code>
-{{indexmenu>..|navbar}}+{{indexmenu>:|navbar}}
 </code> </code>
 or or
 <code> <code>
-{{indexmenu>..|js navbar nocookie}}+{{indexmenu>:|js navbar nocookie}}
 </code> </code>
 You may also want to hide this page in any indexmenu trees with the [[.:indexmenu#skip files in index]] option. You may also want to hide this page in any indexmenu trees with the [[.:indexmenu#skip files in index]] option.
Line 526: Line 527:
 I have in my sidebar the following code  I have in my sidebar the following code 
 <code> <code>
-{{indexmenu>..#1| js navbar id#random }}+{{indexmenu>:#1| js navbar id#random }}
 </code> </code>
  
plugin/indexmenu.1704756801.txt.gz · Last modified: 2024-01-09 00:33 by 2a02:a44a:3b00:1:345b:52b9:d9f:f8b4

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