This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
zref:wiki:pluginsyntax:nspages [2025/04/22 13:44] – removed - external edit (Unknown date) 127.0.0.1 | zref:wiki:pluginsyntax:nspages [2025/04/22 13:44] (current) – ↷ Page moved from wiki:pluginsyntax:nspages to zref:wiki:pluginsyntax:nspages Alan Shea | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== nspages Plugin ====== | ||
+ | < | ||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | email : guillaume.turri@gmail.com | ||
+ | type : Syntax | ||
+ | lastupdate : 2023-07-11 | ||
+ | compatible : 2017-02-19, 2016-06-26a, | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : listing, menu, namespace, navigation | ||
+ | </ | ||
+ | * downloadurl: | ||
+ | * bugtracker : https:// | ||
+ | * sourcerepo : https:// | ||
+ | * donationurl: | ||
+ | ---- | ||
+ | |||
+ | 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. | ||
+ | |||
+ | =====Some examples and common usages===== | ||
+ | |||
+ | ====The very first steps==== | ||
+ | |||
+ | Using this plugin is easy: just write | ||
+ | < | ||
+ | (You may also use the button {{http:// | ||
+ | |||
+ | You will get a list of your pages displayed in columns, like this: {{https:// | ||
+ | |||
+ | If you're interested in the list of the namespaces instead of the list of pages, try this: | ||
+ | <nspages -subns -nopages> | ||
+ | |||
+ | ====Pictures!==== | ||
+ | |||
+ | Now let's do something more colorful: if you have pictures in your pages you can do this: | ||
+ | <nspages -usePictures> | ||
+ | it will represent each page using their first picture, like this: | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | ====Tree==== | ||
+ | |||
+ | 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=" | ||
+ | Bam, you get a tree like this: | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | This was just to get you started. This plugin is highly configurable and has a lot more features we haven' | ||
+ | |||
+ | =====Manual===== | ||
+ | |||
+ | The general syntax is | ||
+ | <nspages path_to_a_namespace -option1 -option2 ...> | ||
+ | where: | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ^ Common options ^^ | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | |||
+ | ^ Less common options ^^ | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | -pregPagesOff | ||
+ | -pregNSOn | ||
+ | -pregNSOff</ | ||
+ | | < | ||
+ | -pregPagesTitleOff | ||
+ | -pregNsTitleOn | ||
+ | -pregNsTitleOff</ | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | |||
+ | ex: '' | ||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | Search and install the plugin using the [[doku> | ||
+ | |||
+ | =====Option -customTitle===== | ||
+ | |||
+ | //(Because the array above is too concise to give all the details about this option)// | ||
+ | |||
+ | This option accepts a string as an argument. The name of the pages will be displayed using this format. The {xxx} part are replaced by the metadata of the page. | ||
+ | |||
+ | For instance | ||
+ | |||
+ | <nspages : | ||
+ | |||
+ | could display: | ||
+ | |||
+ | * [1613513556] <Title of page 1> by Stancu | ||
+ | * [1624663245] <Title of page 2> by Guillaume | ||
+ | |||
+ | Some important details about this option: | ||
+ | * Nspages will render by default only the metadata //title//, //user//, and // | ||
+ | * The list of metadata available by default in Dokuwiki is available in the [[https:// | ||
+ | * It can be use along with other plugins that adds support for custom metadatas (like the [[https:// | ||
+ | |||
+ | ===== Option -sidebar ===== | ||
+ | |||
+ | DokuWiki supports [[doku> | ||
+ | |||
+ | Here is an example of sidebar generated with nspages: | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | To get this sidebar I just put | ||
+ | <nspages -simpleList -h1 -sidebar> | ||
+ | on the page '': | ||
+ | |||
+ | The tricky part is that since I do not specify a namespace then I expect nspages to consider the namespace of the current page. But by default nspages will consider that the current page is '': | ||
+ | |||
+ | That's the point of the '' | ||
+ | * tells nspages that the " | ||
+ | * does not cache the resolution of the resolution of the namespace (because it may change at every page that I browse) | ||
+ | (a consequence is that it makes no sense to both specify a namespace and have the '' | ||
+ | |||
+ | **To put it in a nutshell**: it you use nspages to generate a sidebar, then you should add the '' | ||
+ | |||
+ | ===== Some (important) points ===== | ||
+ | |||
+ | * With version older than 2014-08-10, you should put '' | ||
+ | * The CSS sheet should be taken into account in order for this plugin to work correctly; but because of the cache system it may not be the case the first time you use this plugin (even if '' | ||
+ | * Currently, you may not use a ''>'' | ||
+ | * When you change the default markup inserted by the toolbar button (throught the admin dashboard), you may need to purge your caches to have this change taken into effect (see also the [[https:// | ||
+ | * [[doku>: | ||
+ | * Force your browser to reload it's cache, typically by pressing Ctrl+F5, or Shift+F5 | ||
+ | |||
+ | ===Local Example:== | ||
+ | < |