Using dir_list

The dir_list command accepts a named parameter to indicate which directory to index, followed by a variable list of parameters to create HTML for each item in that directory.
dir="" path to the directory to index. If the path is empty ("") the requested directory is indexed. Always use dir="" in the dir.spml Active Page.

Note: Files that have names beginning with a period ( '.' ) or bullet ('•') are excluded from the listing that dir_list creates.

For each item in the folder the following parameters generate HTML.

FILENAME - the text of the file name.

ENC_FILENAME - the HTML encoded text of the file name.

FILEHREF - a HTTP link to the file. The domain name name and port number in the linke are determined by the dir_port and dir_domain config settings.

ICON - the icon ( gif ) of the file. TeleFinder uses the file "file extension"+.gif to create an <img src> link to a GIF image in the icons folder ( Web Space:Icons ). A file with the name "page.html" will be represented by the icon "html.gif."

FILESIZE - size of file in the format according to sizefmt config.

LAST_MODIFIED - last mod date of the file in the format according to timefmt config.

DESCRIPTION - the file's SitC description output as HTML.

"" -- any quoted text/html.

 

This sample generates a list of links to the contents of a directory.

<!-- #dir_list dir="" FILEHREF " " FILESIZE " " LAST_MODIFIED -->

 That looks like:

Filename1 50 Kb Jan 1, 12:00:00 1998

Filename2 50 Kb Jan 1, 12:00:00 1998

 

A more substantial example can be found in the "dir.spml" Template file. Template files are located in the Web Space:Templates folder.