plugin:nspages
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:nspages [2021-06-19 10:22] – gturri | plugin:nspages [2024-03-07 19:33] (current) – Tested OK with Kaos dregad | ||
---|---|---|---|
Line 6: | Line 6: | ||
email : guillaume.turri@gmail.com | email : guillaume.turri@gmail.com | ||
type : Syntax | type : Syntax | ||
- | lastupdate : 2021-06-19 | + | lastupdate : 2024-01-04 |
- | compatible : 2017-02-19, 2016-06-26a, | + | compatible : Igor, Jack Jackrum, Kaos+ |
depends | depends | ||
conflicts | conflicts | ||
Line 19: | Line 19: | ||
---- | ---- | ||
- | :!: **I'm looking for a co-maintainer!** | + | //**If your Dokuwiki instance is older than the release "Igor - 2022-07-31" you should use the version available [[https://github.com/gturri/nspages/zipball/last_before_igor|here]] (and NOT update it afterward), because subsequent versions of the plugin won't be compatible)**// |
- | + | ||
- | //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. | This plugin nicely displays a table of content of the pages -and optionally the subnamespaces- of a given (sub)namespace. | ||
Line 34: | Line 28: | ||
=====Some examples and common usages===== | =====Some examples and common usages===== | ||
+ | |||
====The very first steps==== | ====The very first steps==== | ||
+ | |||
Using this plugin is easy: just write | Using this plugin is easy: just write | ||
< | < | ||
Line 45: | Line 41: | ||
====Pictures!==== | ====Pictures!==== | ||
+ | |||
Now let's do something more colorful: if you have pictures in your pages you can do this: | Now let's do something more colorful: if you have pictures in your pages you can do this: | ||
<nspages -usePictures> | <nspages -usePictures> | ||
Line 52: | Line 49: | ||
====Tree==== | ====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): | 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=" | <nspages -tree -r -exclude -subns -pagesInNs -h1 -textNs=" | ||
Line 61: | Line 59: | ||
=====Manual===== | =====Manual===== | ||
+ | |||
The general syntax is | The general syntax is | ||
<nspages path_to_a_namespace -option1 -option2 ...> | <nspages path_to_a_namespace -option1 -option2 ...> | ||
Line 74: | Line 73: | ||
| < | | < | ||
| < | | < | ||
- | | < | + | | < |
| < | | < | ||
| < | | < | ||
Line 81: | Line 80: | ||
| < | | < | ||
| < | | < | ||
- | | < | + | | < |
- | | < | + | | < |
| < | | < | ||
| < | | < | ||
Line 113: | Line 112: | ||
| < | | < | ||
| < | | < | ||
- | | < | + | | < |
| < | | < | ||
| < | | < | ||
+ | | < | ||
ex: ''< | ex: ''< | ||
Line 124: | Line 124: | ||
=====Option -customTitle===== | =====Option -customTitle===== | ||
+ | |||
//(Because the array above is too concise to give all the details about this option)// | //(Because the array above is too concise to give all the details about this option)// | ||
Line 141: | Line 142: | ||
* The list of metadata available by default in Dokuwiki is available in the [[https:// | * 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:// | * It can be use along with other plugins that adds support for custom metadatas (like the [[https:// | ||
+ | |||
+ | ===== Option -sidebar ===== | ||
+ | |||
+ | DokuWiki supports [[faq: | ||
+ | |||
+ | 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 ===== | ===== Some (important) points ===== | ||
- | * With version older than 2014-08-10, you should put %%~~NOCACHE~~%% in the pages where you use this plugin, to make sure that if you create or remove a page in the namespace, it will be taken into account. Now, nspages automatically deactivate the cache on the pages where it is used (you can deactivate this behaviour on the admin panel). | + | * 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 %%~~NOCACHE~~%% is specified). The easier way to resolve this is to make sure your cache is invalidated by touching '' | + | * 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 '>' | + | * Currently, you may not use a ''>'' in the '' |
* 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:// | * 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:// | ||
* [[: | * [[: | ||
Line 158: | Line 180: | ||
==== To who ==== | ==== To who ==== | ||
- | + | Any NGO acting for the environment. | |
- | The preference goes to the [[https:// | + | |
- | + | ||
- | If it isn't possible, any association | + | |
==== How ==== | ==== How ==== | ||
Line 172: | Line 191: | ||
Making sure you have a positive impact would already be awesome: | Making sure you have a positive impact would already be awesome: | ||
* Volunteer to an NGO near you. Give some of your time | * Volunteer to an NGO near you. Give some of your time | ||
- | * Ride you bike instead of taking your car | + | |
+ | | ||
* Use a reusable bag and stop using plastic straws | * Use a reusable bag and stop using plastic straws | ||
- | * Reduce your meat and plane consumption | ||
* Plant trees | * Plant trees | ||
* Take only what you need, not what you can | * Take only what you need, not what you can | ||
plugin/nspages.1624090939.txt.gz · Last modified: 2021-06-19 10:22 by gturri