xif-fr / dokuwiki-plugin-catlist

DokuWiki plugin to list pages and namespaces recursively in nested lists
https://www.dokuwiki.org/plugin:catlist
8 stars 15 forks source link

use placeholders to define namespaces #15

Closed juliusverrel closed 5 years ago

juliusverrel commented 6 years ago

Some plugins allow using placeholders such as @NS@, @USER@, @PAGE@, @ID@. This would be extremely useful for flexibly specifying the namespace parameter. Thanks!

xif-fr commented 6 years ago

Hi, could you give me some examples and desired behaviors ?

juliusverrel commented 6 years ago

Hi, thanks for replying and sorry for not giving examples right away. I'd like to be able to use placeholders similar to the ones that can be used in namespace template pages to create catlist expressions such as

<catlist userpages:@USER@: > // replace @USER@ by id of currently logged-in user <catlist projectpages:@PAGE@: > // replace @PAGE@ by name (without namespace) of current page

Medialist has a similar functionality, allowing placeholders @ID@, @NS@, @PAGE@.

(I'm using catlist in templates for the plugin pagetemplater, meaning that I need to use a "variable" expression for catlist. Currently I'm using phpwikify to create that expression, but there are security issues with that plugin.)

xif-fr commented 6 years ago

This is doable, I'll see if I can reuse some of the code from the template engine, if I have time. But this feature should really be integrated in dokuwiki itself, because it could be useful with any plugin.

xif-fr commented 5 years ago

Implemented in the last version.