FilenameFilesizeLast modified
0001-fix-ACL-preview-for-users-with-special-chars-FS-2206.patch14172011/06/10 02:09
dokuwiki-128.png336152010/01/15 22:41
dokuwiki-2009-02-14_lara.patch78042010/01/15 22:48
dokuwiki-2009-02-14_lara.patch.old34502009/11/04 14:11
dokuwiki-2009-12-25b_lara.patch207002010/05/12 03:25
dokuwiki_s5_lara.tar.gz151062010/01/05 16:18
larawiki.dia1918232010/01/15 23:39
larawiki.png788672010/01/16 00:03
media_selection_subfolder.png598742009/12/11 14:54
media_uploaded.png974802009/12/11 14:53
mmclean-2007-10-31_lara.patch192302010/05/12 03:10
mmclean-2007-10-31_lara.patch.old105092009/08/13 17:38
pagemove_20070212.patch40152010/01/07 16:05
The syntax is as follows.
{{[ command ]>[ pattern ][ parameterlist ]}}
* **command** must be either ''filelist'' or ''filename''.
* **pattern** is a searching pattern for files to include in the generated list, defined using the [[http://man.cx/fnmatch(7)|pattern syntax of the unix fnmatch function]]. An example: If you want to include all files ending on ''.txt'' in the folder ''some/path/''((relative to your dokuwiki root)), you would use ''some/path/*.txt'' as the pattern (and the parameter ''direct=1'', see [[#parameters]] below). Analogue to this, to include all jpeg media files in '':some:namespace'', you'd use '':some:namespace:*.jpg''.
* **parameterlist** can be used to define optional, ''&'' separated parameters (defined as key-value-pairs). For a list of supported parameters, see [[#parameters|below]].

The filelist plugin supports both absolute as well as relative paths into the filesystem or Dokuwiki media namespaces. All paths are checked against a whitelist of allowed paths for scanning (as defined via the configuration setting ''allowed_absolute_paths''). Paths which are not located below these whitelisted paths are not allowed for globbing and thus filelist/filename calls to such paths fail. Per default, the Dokuwiki basedir as defined in DOKU_INC is included in this whitelist and mapped to the Dokuwiki base-URL, DOKU_URL.

Relative paths into the filesystem are interpreted relative to the Dokuwiki basedir. Relative media paths (without a leading : that is) are interpreted relative to the namespace of the currently active page. Thus, :snippets:dokuwiki:* and * would be interpreted the same on the current page :snippets:dokuwiki:filelist.

Name Description Possible values Default
direct Whether to interpret the given pattern as a direct path in the file system or as an dokuwiki media id. Defaults to media id. 0 or 1 0
sort The property by which to sort the internal file list. By default, the file name is used, with upper case being sorted before lower case (use iname for a case insensitive sorting criteria). name, iname, ctime, mtime, size name
order Whether to sort the internal file list ascending or descending. Sorting in ascending order is the default. asc, desc asc
filelist specific parameters
offset The offset in the internal file list from which on to display the list. Default is an offset of 0. any numeric value 0
limit The number of files to display, beginning at index offset. A number of 0 means to display all available files. any numeric value 0
style The style to use for display. list creates an unordered bullet list (the default), olist an ordered list, table a table view and page a heading/section based view of the selected files. list, olist, table, page list
tableheader Whether to show the table header describing the table columns. Off by default. 0 or 1 0
tableshowdate Whether to show the file modification date in the table view. Off by default. 0 or 1 0
tableshowsize Whether to show the file size in the table view. Off by default. 0 or 1 0
recursive Whether to do a recursive file crawl starting at the defined basepath. If this parameter is set to 1, the whitecard part of the search pattern is applied to each found subdirectory. If no files are found, the subdirectory is not included in the search result. All display styles besides table will show the result in a hierarchical structure; table will first flatten the result by prepending all found files with there subtree pathname (note that this happens before sorting). 0 or 1 0
titlefile The filename of a file which to lookup in each subtree if recursive is set to 1 and whose content to use as title for the directory. It will be ignored in the results of the filelisting itself. Defaults to _title.txt. Example: A _title.txt file containing “My special title” found during a crawl on the subpath my/subpath will be rendered as having the name “My special title” instead of “subpath”. any filename _title.txt
filename specific parameters
index Which specific item to select for display from the internal file list. The default is the first one. any numeric value 0

For example.

{{filename>*}}

gives a link to the first file which matches

[n/a: No match]

A list of all matching files can be shown, with various parameters to change the way it is displayed.

{{filelist>:wiki:*&style=list}}

gives

or

{{filelist>:wiki:*&style=table&tableheader=1&tableshowdate=1&tableshowsize=1}}

gives

FilenameFilesizeLast modified
0001-fix-ACL-preview-for-users-with-special-chars-FS-2206.patch14172011/06/10 02:09
dokuwiki-128.png336152010/01/15 22:41
dokuwiki-2009-02-14_lara.patch78042010/01/15 22:48
dokuwiki-2009-02-14_lara.patch.old34502009/11/04 14:11
dokuwiki-2009-12-25b_lara.patch207002010/05/12 03:25
dokuwiki_s5_lara.tar.gz151062010/01/05 16:18
larawiki.dia1918232010/01/15 23:39
larawiki.png788672010/01/16 00:03
media_selection_subfolder.png598742009/12/11 14:54
media_uploaded.png974802009/12/11 14:53
mmclean-2007-10-31_lara.patch192302010/05/12 03:10
mmclean-2007-10-31_lara.patch.old105092009/08/13 17:38
pagemove_20070212.patch40152010/01/07 16:05

See filelist for more information.

 
wiki/snippets/filelist.txt · Last modified: 2010/01/04 18:34 by Olivier Mehani
Recent changes · Show pagesource · Login