SID-02234: TopicList excluding topic names selected by cards
| Status: |
Answered |
TWiki version: |
6.0.2 |
Perl version: |
n/a |
| Category: |
CategorySearch |
Server OS: |
n/a |
Last update: |
9 years ago |
How to a create a list of topics
such as %TOPICLIST {topic="-web*"}%
i.e. excluding all topics whose name starts with the literal "web"?
tia
--
TWiki Guest - 2016-08-01
Discussion and Answer
Either do a SEARCH, or a TOPICLIST enclosed in a CALCULATE.
SEARCH example:
%SEARCH{ "." scope="topic" type="regex" excludetopic="Web*" format="$topic" separator=", " nonoise="on" }%
TOPICLIST example:
%CALCULATE{$LISTIF($NOT($EXACT($FIND(Web, $item), 1)), %TOPICLIST{ separator=", " }%)}%
Details in
VarSEARCH,
VarTOPICLIST,
VarCALCULATE.
--
Peter Thoeny - 2016-08-02
Thanks, gosh that is such a hard way to do such a simple thing.
--
TWiki Guest - 2016-08-02
SEARCH in action (pasted from above):
%SEARCH{ "." scope="topic" type="regex" excludetopic="Web*" format="$topic" separator=", " nonoise="on" }%
TOPICLIST in action (pasted from above):
%CALCULATE{$LISTIF($NOT($EXACT($FIND(Web, $item), 1)), %TOPICLIST{ separator=", " }%)}%
--
TWiki Guest - 2016-08-02
$FIND does not appear to be documented (based on the twiki.org search).
Are $Variables also %variables%?
--
TWiki Guest - 2016-08-02
Found it, its a plugin,
SpreadSheetPlugin
--
TWiki Guest - 2016-08-02
If you find an API that could be enhanced, by all means please support open source software and
get involved. You could enhance the API and post a patch or
hire a TWiki consultant to do that for you.
--
Peter Thoeny - 2016-08-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.