用户工具

站点工具


02-工程实践:cms:dokuwiki:nspages_plugin

nspages plugin

插件主页:https://www.dokuwiki.org/plugin:nspages

Description

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

<nspages>

and see the result. (You may also use the button from the toolbar.)

The general syntax is

<nspages path_to_a_namespace -option1 -option2 ...>

where:

  • pathtoa_namespace represents 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.
  • -option may be one of the following (it is possible to specify several options):

^ Common options ^^

-subns displays the subnamespaces of the selected namespace (and provide links to their main page)
-nopages do not list the pages of the selected namespace (of course this option is useful only if you use -subns)
-exclude:nameOfPage won't include the page nameOfPage. This option may be use several times in order to exclude several pages
-exclude:subNs: won't include the subnamespace subNs. This option may also be used more than once
-exclude won't include the current page
-h1 will display the first h1 title found. If a page doesn't contain such a title, the name of the page is used instead
-textPages=“some text” some text will be displayed instead of the default text, to introduce the pages list
-textNS=“some text” some text will be displayed instead of the default text, to introduce the namespaces list
-title alias of -h1
-simpleList display the list on a single column
-simpleLine display the list on a single line (incompatible with -simpleList)
-nbCol=3 Change the number of columns to use (default is 3)
-sortId Sort the pages according to their id, even if -title is used
Less common options
-reverse Sort the pages in reverse order
-pagesInNs The pages will appear among the namespaces
-r recurse : display elements of the subnamespaces. You may use just “-r” to check every subnamespace, or e.g. “-r=3” to have a depth limit to 3 levels
-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: -pregPagesOn=“/doku/i” will display only pages which contains “doku” in their id.
Several options may be used, and each of them may be used several times.

ex: <nspages pathtoa_namespace -exclude> or <nspages -subns -nopages> will work.

效果截图

02-工程实践/cms/dokuwiki/nspages_plugin.txt · 最后更改: 2020/04/07 06:34 由 annhe