Learn about DokuWiki
Learn about DokuWiki
Compatible with DokuWiki
This plugin nicely displays a table of content of the pages -and optionally the subnamespaces- of a given (sub)namespace.
Using this plugin is easy: just write
and see the result. (You may also use the button from the toolbar.)
The general syntax is
<nspages path_to_a_namespace -option1 -option2 ...>
path_to_a_namespacerepresents the path to the wanted namespace. It can be an absolute (ex:
namespace1:subnamespace) or a relative path (ex:
.:subnamespace). If no path is specified, the current namespace is selected.
-optionmay be one of the following (it is possible to specify several options):
|displays the subnamespaces of the selected namespace (and provide links to their main page)|
|do not list the pages of the selected namespace (of course this option is useful only if you use
|won't include the page nameOfPage. This option may be use several times in order to exclude several pages|
|won't include the subnamespace subNs. This option may also be used more than once|
|won't include the current page|
|will display the first h1 title found. If a page doesn't contain such a title, the name of the page is used instead|
|some text will be displayed instead of the default text, to introduce the pages list|
|some text will be displayed instead of the default text, to introduce the namespaces list|
| alias of
|display the list on a single column|
|display the list on a single column, as an ordered list|
| display the list on a single line (incompatible with
|display the list on a single column, separated only by line breaks (incompatible with the previous flags)|
|display the first image of each page|
| Change the number of columns to use (default is
| Sort the pages according to their id, even if
|Less common options|
|Sort the pages in reverse order|
|Sort the pages in natural order|
|Sort the pages by date of last modification|
|Sort the pages by date of creation|
|The pages will appear among the namespaces|
| recurse : display elements of the subnamespaces. You may use just
-exclude:[page1 subNs: page2]
|an easier syntax to exclude several pages/subnamespaces|
-pregPagesOn -pregPagesOff -pregNSOn -pregNSOff
| Enable the use of regex to select the documents that should be displayed. Eg:
Several options may be used, and each of them may be used several times.
| Add anchors on each title-letters, to let link directly to them. Anchors will look like, e.g. for the letter A:
|print an actual html title (not just a bold and underlined text)|
|print an actual html title
|Use the format “id of the item - title of the item”|
|Display at most n pages or subnamespaces|
|Hide page header and “no pages” message if no pages present|
|Hide subnamespace header and “no subnamespace” message if no subns present|
<nspages path_to_a_namespace -exclude> or
<nspages -subns -nopages> will work.
If you have one of the latest version of DokuWiki (at least 2009-12-25, Lemmings), you may use this archive: https://github.com/gturri/nspages/zipball/master.
conf/local.php(eg. by resaving your configuration)
-textNSoptions, since it is understood as the end of the <nspages> tag
nspages is a personal open source project started in 2008. I have put hundreds of hours to maintain and enhance it.
Donations to nspages will help support bugfix, keeping compatibility with upcoming versions of DokuWiki, and adding new features.
If you have found this plugin useful, consider donating, to help for its development.
nspages is one of the must-have DokuWiki plugins, I use it all the time. I made a small donation to support your work. Thank you ! — Laynee 2016-03-07 22:10
Great plugin. I have a question though. Is there a way to format the size of the heading section? — jakedp
No, it's not possible – Guillaume
Thank You for the response. In styles.css you can change the size of the font which is what I was looking for exactly. — jakedp
Is there a way to put this in a sidebar and have it update what namespace it lists for subnamespaces? For example, put <nspages> in /sidebar, and then when I browse to a page like /projects/project1/somepage, have /projects/project1/ be the namespace listed in the sidebar without having to edit /projects/project1/sidebar (but rather, have it inherited)? — Chris S.
As far as I know, it's not possible. – Guillaume