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

suggestion. -include option #13

Open coastgnu opened 6 years ago

coastgnu commented 6 years ago

An -includeoption would be fine.

E. g. template:sprintdoc works like a charm with catlist for a dynamic Menu in the sidebar

As you can see at "https://demo.sprintdoc.de/sidebar" they have a menu structure which doesn't follow a given namespace:

===== Dokumentationspatterns @book-open-page-variant.svg =====

  * [[pattern:start|Dokumentationsmuster]]
  * [[usecase:start|Dokumentationsvorgänge]]
  * [[patterns:help:anleitung|Dokumentation Patternanpassung]]

T use catlist for such a case an option -include:":patterns:help:anleitung" would solve this.

Your catlist also works like a charm with template:bootstrap3. The indexmenu plugin doesn't, it breaks <datatable> and others. So catlist is a good replacement for indexmenu in template:bootstrap.

thank you for this plugin!

regards, thomas

xif-fr commented 6 years ago

Ok, so you want to be able to include, at the root of the tree, any page / namespace ?

fwolfst commented 3 years ago

Ok, so you want to be able to include, at the root of the tree, any page / namespace ?

From my understanding it doesnt have to be the root of the tree, but included and sorted as if it were under the same namespace. As the sorting criteria would require some configuration to cover many cases, a -prepend and -append option already might be great (-include sounds more like -merge to me).

xif-fr commented 3 years ago

I still have a hard time understanding what is needed, could you provide an example quickly ?

fwolfst commented 3 years ago

I'll try.

:root
├── :instructions
│   ├── scuba
│   └── wingcopter
└── :machines
    ├── spacearm
    └── wingcopter

<catlist :root:instructions> would create an insctructions list with scuba + wingcopter as children.

OP wanted <catlist :root:instructions -include :machines:spacearm> to create an instructions list with scuba + wingcopter + spacearm as children.

I also have the usecase where I'd like to include a few (sometimes just one) items in a sidebar menu which are not in the given namespace.