demo
templates
install
contact
Home Help BBCode Folder

Folder

[folder=/documents]*.doc[/folder] -or- [folder]/documents[/folder] (deprecated)
Show a listing of files store within the specified folders on the web server. If a file called 'index.*' (with any extension) is found, that index page will be loaded instead of the listing of files. This is similar to the action of the Apache Web Server in that an index.htm is loaded if it is found in the folder.

The form [folder]/documents[/folder], while still supported, is deprecated and should be replaced with the preferred form as soon as possible. Support for this format may be removed in a future version.

With the preferred [folder=/directory]file.ext[/folder] form, a file specification (file.ext) can be used to limit the files that are displayed. The wild card characters "?" and "*" can be used to represent any one character ("?") or any number of characters ("*"). Multiple filters separated by commas can be used, such as "*.gif,*.jpg, *.png" to list all the common web graphics formats. If no file specification is used, all files are displayed, except for the hidden files specified in the system configuration.

Since any index* file that is found in a folder is loaded, the [folder] tag can be used as a redirect tag. For example, if you want to load /gallery/index.php, but want the menu to read 'photos', edit the 'photos' page to contain [folder=/gallery][/folder], and the gallery/index.php page will be loaded.


Formatting the Display

The file listing is placed in an unordered list with the style class "folder", using the CSS style of "folder-file" for the file names and "folder-dir" for the sub-folder names.

The default template style sheet has the following definitions:

.folder {
  list-style-type: none;
  margin-left: 6px;
  padding-left: 6px;
}
.folder-dir {
  list-style-position: inside;
  list-style-type: none;
  list-style-image:    url(../util/foldericon.gif);
}
.folder-file {
  list-style-position: inside;
  list-style-image:    url(../util/preview.gif);
  list-style-type: none;
}

Which gives a display something like:



Security Note

This tag allows the listing of file names in any folder and any sub-folders within, without regard to any .htaccess restriction (such as password-protected folders). The viewing of the contents of any file is still subject to password restrictions, so the contents of password-protected files is still protected. Do not use this tag on folders where the file names themselves should not be revealed. If there is a folder that you do not want the file names revelaed. make certain that there is a files named "index.html" in the folder to be displayed insted of the file listing.