Filelist
Add block - Advanced - Advanced - Filelist
Filelist is used to create a list of links to files in a folder
The default filelist
- Sort files by:
- Last modified date
- Name
- Type
- Size
- Sort direction
-
Folder
Select the folder of files to list
- Files per page
The number of files to display before paging
Simple Default Filelist
CSS
The default filelist has no css classes or styles except in the pagination
Standard filelist paging has one class on the outer div the rest is styled by reference
.filelist_paging {}
.filelist_paging span {}
.filelist_paging a {}
HTML
Using HTML the filelist is far more flexible
Xt functions can be split on to multiple lines for clarity
<xt:filelist
sort_type=""
sort_dir=""
folder=""
template=""
per_page=""
filter="" />
-
Folder
The path is always relative to the Root directory
You can also set
-
Template
A html template for the functions output
-
Filter
A simple one layer filter with wildcards
-
?
Match any 1 character
-
*
Match any number of characters
-
-
At the begining of the filter makes the filter negative
Template variables
-
.file_mime.
returns the mime of the file
ie image/png audio/mp3
-
.file_type.
returns the name of the icon file (without .png extension)
As used by the Xtgem filebrowser for that type of file
http://xtgem.com/images/icons/mimes/.file_type..png
-
.file_url.
Address of the file
-
.file_name.
Name of the file
-
.file_name_parsed.
Name of the file with underscores converted to spaces
-
.file_name_base.
Name of the file without the extension
-
.file_name_base_parsed.
Name of the file without the extension and with underscores converted to spaces
-
.file_size.
Size of the file
-
.file_size_kb.
Size of the file in kilobytes
-
.file_size_mb.
Size of the file in megabytes
-
.file_date.
The files date
-
.file_time.
The files time
-
.file_datetime.
The files date and time
-
?__xt_download=1
Add this after .file_url. to force images etc to download instead of opening
Template converter