## Purpose and syntax (:attachlist:) command

(: attachlist:) command is designed to be inserted into a wiki page list of attachments:

(:attachlist [params...]:)

Additionally, the command (: attachlist:) can be used sort parameter, which specifies the sort order of files. Sort parameter can be the following:

- name - attached files will be sorted by name (this is equivalent to command (: attachlist:) without parameters);
- descendname - the attached files will be sorted by name in descending order;
- ext - the attached files will be sorted by extension;
- descendext - the attached files will be sorted by extension in descending order;
- size - the attached files will be sorted by size;
- descendext - the attached files will be sorted by size in descending order;
- date - the attached files will be sorted by their date of last modification;
- descendext - the attached files will be sorted by their date of last modification in descending order;

## Examples

At current page there are five attached files, the following table shows the output of the command (:attachlist:) with different values ​​of the parameter sort:

Command | (:attachlist:) | (:attachlist sort=ext:) | (:attachlist sort=descendext:) | (:attachlist sort=size:)
Result | anchor.png first.jpg image.gif image.jpg image.png | image.gif first.jpg image.jpg anchor.png image.png | image.png anchor.png image.jpg first.jpg image.gif | anchor.png first.jpg image.jpg image.gif image.png