TIP TopicListPlugin is not installed on Foswiki.org.

TopicListPlugin

Gives you the possibility to generate a list of topics by macro or rest handler. Should be also optimized for a great number of topics

Introduction

Yet it is not able to use a rest function to recieve a list of all topics of a web, picking them up e.g. by the starting character "S" or similar. A use case is e.g. the TinyMCE editor, when you like to be able to pick the topics out of list when you try to link.

The goal is, to make this plugin efficient even if you have a great number of topics. Mostly this can be done, by excluding topics by a starting character, to shorten/filter the result.

Usage

Macro %GETTOPICLIST%

Parameter Default Description
searchwebs Current web which web should be used to get the topic-list. User -all- for getting all topics of all webs.
you can also use a comma-separated list of webs
pattern * ( all ) regular expression for matching topic-names
casesens 1 be case sensitive
negate 0 negate the pattern. So all topics which do match the pattern, are not shown
max 50 maximum number of results. Use 0 for infinite
order < literal order, < for increasing, > for decreasing
format " * [[%WEB.%TOPIC][%TOPIC]]" format for each resulting row, %WEB gets replaced by the web, %TOPIC by the topic name
_delimiter "\n" what delimiter should be used to seperated the topics
_globalformat "%TOPICS" the whole topic list will replace the %TOPICS varibale in this string. This string will be return as the result of the rest handler
Examples:
  • List maximum 20 topics of this web starting with "S", decreasing order: %GETTOPICLIST{pattern="^S.*$" max="40" order=">"}%
%GETTOPICLIST{searchwebs="-all-" pattern="^S.*$" max="40" order=">"}%
  • List all topics of this Main web not starting with "S", increasing order: %GETTOPICLIST{searchwebs="Main" pattern="^S.*$" negate="1" max="20"}%

Rest Methods

topicList

Parameter Default Description
searchwebs Current web which web should be used to get the topic-list. User -all- for getting all topics of all webs.
you can also use a comma-separated list of webs
pattern * ( all ) regular expression for matching topic-names
casesens 1 be case sensitive
negate 0 negate the pattern. So all topics which do match the pattern, are not shown
max 50 maximum number of results. Use 0 for infinite
order < literal order, < for increasing, > for decreasing
format "'%TOPIC'" format for each resulting row, %WEB gets replaced by the web, %TOPIC by the topic name. The result is by default formated as JSON array item
_delimiter "," what delimiter should be used to seperated the topics
_globalformat "[%TOPICS]" the whole topic list will replace the %TOPICS varibale in this string. This string will be return as the result of the rest handler, by default a JSON array

Installation instructions

  • just use the installer attached to the topic or even easier, use the configure-system/Extension to easy install it through an user-interface
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the Plugin on the server where Foswiki is running.

  • Set SHORTDESCRIPTION = Gives you the possibility to generate a list of topics by macro or rest handler. Should be also optimized for a great number of topics

Plugin Author: Foswiki:Main.EugenMayer
Copyright: © 2009, Collaborganize www.collaborganize.com
License: GPL (GNU General Public License)
Release: 0.4.1
Version: 9954 (2010-11-11)
History:  
11 Nov 2010 Padraig Lennon: Foswikitask:Item9995 - Fix Release Version
27 Jan 2009: fixed a bug in the macro
28 Dez 2008: fixed minor bugs, added delimiter / globalformat, cosmetic things, new defaults
26 Dez 2008: implemented all methods. Yet no index or cache is implemented, so maybe not working to good on many topics
22 Dez 2008: initial release
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.0
Plugin Home: http://foswiki.org/Extensions/TopicListPlugin
Support: http://foswiki.org/Support/TopicListPlugin

Related Topics: SitePreferences, Plugins
Topic revision: r7 - 11 Nov 2010, PadraigLennon - This page was cached on 04 Dec 2016 - 05:10.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License