Site Tools


wiki:pluginsyntax:indexmenu

Differences

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

Link to this comparison view

wiki:pluginsyntax:indexmenu [2018/05/28 22:29] – created - external edit 127.0.0.1wiki:pluginsyntax:indexmenu [2023/11/01 02:27] (current) Alan Shea
Line 4: Line 4:
  
 ===== Quick Syntax ====== ===== Quick Syntax ======
-|:!: All the syntax options can be easily accessed with the indexmenu picker in the [[:edit window]] [[:toolbar]].|+|:!: All the syntax options can be easily accessed with the indexmenu picker in the [[doku>:edit window]] [[doku>:toolbar]].|
  
 ^Main ^Options | ^Main ^Options |
Line 13: Line 13:
 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 [[doku>: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 [[doku>: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: Optional settings **after the "|"** separator:
Line 21: Line 21:
 ^ ''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.| ^ ''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. | ^ ''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''    | [[:namespaces#creating namespaces|Relative]] //**main namespace**// and //**optional namespaces**// will refer to the current DokuWiki namespace context ((the namespace of the page displayed by a user who is navigating your site)) 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.| +^ ''context''    | [[doku>:namespaces#creating namespaces|Relative]] //**main namespace**// and //**optional namespaces**// will refer to the current DokuWiki namespace context ((the namespace of the page displayed by a user who is navigating your site)) 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 [[config:useheading]] is on. By default namespaces are **not** sorted, you need the **//nsort//** option for this.|+^ ''tsort''  | Sort (only) pages by title. | Useful when [[doku>config: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.| ^ ''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 [[:devel:metadata]] information. Without the **meta** parameter, it looks for the custom sorting number specified with the %%{{indexmenu_n>N}}%% syntax (see the below [[.indexmenu#metadata tag syntax]]). **meta** should refer to the [[:devel:metadata#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.|+^ ''msort[#meta]''  | Sort (only) pages by a custom [[doku>:devel:metadata]] information. Without the **meta** parameter, it looks for the custom sorting number specified with the %%{{indexmenu_n>N}}%% syntax (see the below [[.indexmenu#metadata tag syntax]]). **meta** should refer to the [[doku>:devel:metadata#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. | ^ ''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.| ^ ''nsort''  | Sort also namespaces according to page sort options. | To use in addition to the above sort options. tsort option will apply to headpages.|
Line 87: Line 87:
 **Examples:** **Examples:**
  
-You can change the order of this tree containing a mix of standard and [[config:useheading]] pages:+You can change the order of this tree containing a mix of standard and [[doku>config:useheading]] pages:
  
 <file> <file>
wiki/pluginsyntax/indexmenu.1527546544.txt.gz · Last modified: 2018/05/28 22:29 by 127.0.0.1