To display a list of all the separate folder names in a path (text separated by "/"), use a [ListPath] context. You may optionally specify that only the filename will be displayed (subtracting any path leading to it), or only the folder names (subtracting the filename from the end).
ListPath is only used for text-manipulation -- it does not actually look at your hard disk. If you want to find all the files in a folder on your hard disk, use [ListFiles] instead.
Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):
The example above yields:
Path part #1: folder1 Path part #2: folder2 Path part #3: folder3 Path part #4: filename.txt
The example above yields:
Path part #1: filename.txt
The example above yields:
Path part #1: folder1 Path part #2: folder2 Path part #3: folder3
The following parameters are used in the [ListPath] context:
Parameter | Description |
---|---|
path
|
(Required) Path text to break apart. |
FileOnly
|
(Optional) Set to "T" if you only want to display the filename at the end of the path. |
PathOnly
|
(Optional) Set to "T" if you want to display only the folder names, but not the filename at the end of the path. |
Tag | Description |
---|---|
[index]
|
A number from 1 to the total number of names in the path text indicating the item's index position in the list. |
[name]
|
Text of the path piece currently being displayed. This can either be a folder name or a filename, depending on the placement of the text in the path (the text after the last "/" is considered to be the filename). |
[filename]
|
Text of the filename, leaving off the folder names leading to it. |