File Listing Plugin
Allows you to list the files using appropriate format, anywhere in the topic.
Syntax Rules
%FILELIST% - Default rendering
%FILELIST{format="..." web="webname" topic="topicname"}% - With specified format/web/topic.
The format can be specified with following variables:
| Variable |
Explanation |
| $fileName |
Name of the file |
| $fileIcon |
Icon image representing this file type |
| $fileSize |
Size of the file |
| $fileComment |
Comment attached to this file |
| $fileUser |
Who submitted |
| $fileDate |
When submitted |
| $fileUrl |
URL of the file, assumes ATTACHURL path |
| $viewfileUrl |
Full path with 'viewfile' as script name |
| $fileActionUrl |
Full path of management URL for this file (for changing properties etc. |
| $n |
inserts newline character. |
| $br |
inserts BR tag |
Test it
(You would have to create a topic called
Sandbox.TopicWithAttachment and attach a set of files there.)
Input
%FILELIST{format=" * [[$fileUrl][$fileName]]: Submitted by $fileUser on $fileDate. Size=$fileSize. $fileComment [[$fileActionUrl][Manage this.]]" web="Sandbox" topic="TopicWithAttachment"}%
Output - if installed
Plugin Settings
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = %FILELIST% macro allows you to reference the list of attachments anywhere in the topic, as per the given format.
- Default Format of rendering the attachments:
- Set FORMAT = ' * $fileName? : $fileComment $n'
- Debug plugin: (See output in
data/debug.txt)
Plugin Installation Instructions
- Instructions for Admins:
- Download the ZIP file from the Plugin web (see below)
- Make sure to add
$TWiki::cfg{Plugins}{<nop<FileListPlugin}{Enabled} = 1; in TWiki.cfg file for Dakar Release.
- Unzip FileListPlugin.zip in your twiki installation directory. Content:
| File: |
Description |
data/TWiki/FileListPlugin.txt |
Plugin Topic |
data/TWiki/FileListPlugin.txt,v |
Plugin Topic Repository |
lib/TWiki/Plugins/FileListPlugin.pm |
Plugin Module |
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins,
EmptyPlugin
Topic revision: r15 - 2007-08-23 - 10:14:27 -
ChrisHogan