Learn about DokuWiki
Learn about DokuWiki
Compatible with DokuWiki
I'm looking for a co-maintainer!
If you're a user of this plugin, don't worry: I'm still taking care of it, I will make sure it keeps working with future versions of DokuWiki. But I have much less time than before to dedicate to it, and as a consequence feature requests tend to pile up.
If you're interested in co-maintaining this plugin, just send me an email (address available in the commit log).
This plugin nicely displays a table of content of the pages -and optionally the subnamespaces- of a given (sub)namespace.
If you're discovering this plugin and want to have a glimpse at what you can do with it, the first section, which shows some common usages, is made for you
If you're interested in understanding all the options, in order to use it to best fit your needs, you may want to jump directly to the 2nd section.
Using this plugin is easy: just write
(You may also use the button from the toolbar.)
You will get a list of your pages displayed in columns, like this:
If you're interested in the list of the namespaces instead of the list of pages, try this:
<nspages -subns -nopages>
Now let's do something more colorful: if you have pictures in your pages you can do this:
it will represent each page using their first picture, like this:
One last example: instead of displaying the content of a single namespace, let's display a hierarchy of pages as a tree. For the hype, let's use a whole bunch of options together (you can look at the next section in order to understand what each of those option does):
<nspages -tree -r -exclude -subns -pagesInNs -h1 -textNs="All my content as a tree!">
Bam, you get a tree like this:
This was just to get you started. This plugin is highly configurable and has a lot more features we haven't mentioned yet (other ways to display pages, to filter out some pages, to display pages with another order, …). The next section gives all the details
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 used 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|
| group the items per namespaces. To be used with the -r flag. Eg:
<nspages -r -subns -nopages -tree>
| 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.
-pregPagesTitleOn -pregPagesTitleOff -pregNsTitleOn -pregNsTitleOff
|Behaves like -pregPagesOn and -pregPagesOff & Co, but filters on the title (instead of the id).|
| 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|
|Specify the picture to display when -usePictures is used and a page doesn't contain any picture. Can be used to point at either a local file (
) or remote one (
|Include pages that are normally excluded from search with the hidepages config parameter. Useful for creating table of contents for hidden namespaces.|
|Sort according to the locale specified (see the doc). Example of usage:
<nspages path_to_a_namespace -exclude> or
<nspages -subns -nopages> will work.
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.
It is provided as a charityware. It can be downloaded and installed at no charge. If you found it useful and would like to support its development, you may make a donation to a non-profit charitable organization.
The preference goes to the World Wildlife Fund (WWF) because the are both protecting biodiversity and fighting climate change effectively.
If it isn't possible, any association acting for the environment would do the trick.
Forwarding me (address available at the top of the page) the confirmation email you send or receive will ensure your kind gesture will motivate me to continue developing this software.
Making sure you have a positive impact would already be awesome: