logo
Home XtGem- Templates- XtScript- bottom

Filelist

Add block > Advanced > Advanced > Filelist

A simple file list

This function creates a list of links to the files in a named folder
There are settings for sort type , sort direction , folder and number of links per page

<xt:filelist sort_type="name" sort_dir="desc" folder="/manual/xtgem/folder" template="" per_page="10" />
Folders in the list
If your filelist folder contains sub-folders each sub-folder should also contain its own index page with a copy of your filelist code

advanced filelist

Using html you can also set a custom output template and filter
NOTE: the reserved characters in your template MUST be converted to the NAMED html entity equivalent
< = &lt;
> = &gt;
& = &amp;
" = &quot;

Forced download

You can force a file to download instead of opening with a special "get" variable added to the file url
?xt_download=1

Filelist template variables

"parsed" option has underscores converted to spaces
"base" option returns the file name without the extension
.file_type. returns the name of the icon file
(without .png extension)
As used by the Xtgem filebrowser for that type of file

.file_url.
.file_name.
.file_name_parsed.
.file_name_base.
.file_name_base_parsed.
.file_size. .file_size_kb. .file_size_mb.
.file_mime. .file_type.
.file_date. .file_time. .file_datetime.

Filelist template converter

here is a simple template for a forced download filelist
and a converter to create the correct format
demo output
BOOKOSBI.TTF (158.65KB)
3D GOLD NOKIA.sis (397.95KB)
20th.mid (5.8KB)
<567prev9>

Filter

filter="...."
Enter your filter text
Use the query (?) to replace any one character
Use the asterisk ( * ) to replace any sequence or string of characters.
If the first character in the filter is minus (-) the filter will become negative

Folder search

Folder search page (v2)

Use the filter and Xtscript to search a folder of files
and output the results
Blog and filelist
custom paging
This Xtscript will create a custom paging using Xtgem template classes for Xtgems blog or filelist function The script must go on the page with the Blog or Filelist function see example list above
Xtscript
Powered by XtGem
About us Contact Forum topÂ