<txp:file_download_list /> sing/cont tag, 11 attributes

file_download_list

The file_download_list tag is a single or a container tag which is used to produce a list of download links according to the given attributes. Each file in the list is formatted by the file tags used in the given form (default is the files form).

If used as a container, it must be specified as an opening and closing pair of tags, like this:

<txp:file_download_list>
...contained statements...
</txp:file_download_list>

attributes

category="unset" 
  • Restrict to files from the specified category. Allows a comma separated list of category names. Note: category names may be different to the Title you typed when you created the category, as the names are sanitized for URL use. Check the Categories tab to ensure you are using the correct names
status="live" 
  • Restrict to files with the specified status.
  • Values: hidden, pending, live.
author="unset" 
  • Restrict to files with the specified author.
realname="unset" 
  • Restrict to files with the specified author name.
sort="filename asc" 
  • Values
    • id
    • filename
    • category
    • description
    • downloads
    • created
    • modified
    • rand() (random)
  • Direction
    • asc (ascending)
    • desc (descending)
limit="10" (integer) 
  • Number of files to display.
offset="unset" (integer)
  • Number of files to skip.
pageby="unset" 
  • Number of files to jump each page. Without this attribute, you cannot navigate using the newer and [older]] tags. Usually you will want to track the limit attribute. Use pageby=“limit” to do this, which means you will not have to amend two values if you subsequently decide to alter the limit
form="files" 
  • Use the specified form to process the files.
id="unset" 
  • Display the specific file or list of files.
  • Value: (comma separated list of) file ID(s).
auto_detect="category, author" 
  • List of Textpattern contexts to consider when automatically searching for files. If you wish to turn off the automatic check, set this to auto_detect=”“.
  • You can choose from the following contexts:
    • category to look in the URL for a category list
    • author to look in the URL for an author list

presentation

label="unset" 
  • Label prepended to item (or as first list item, where appropriate).
  • if wraptag is available and is set to ol or ul, the label will be the first list item.
labeltag="unset" 
  • (X)HTML tag (without brackets) to wrap around label.
break="br" 
  • (X)HTML tag (without brackets) or string to separate list items.
wraptag="unset" 
  • (X)HTML tag (without brackets) to wrap around the list.
class="file_download_list"
  • (X)HTML class attribute to apply to the wraptag.

genealogy

Version 4.3.0

  • pageby attribute added to enable paging via newer and older
  • author and realname attributes added
  • auto_detect added to allow automatic (URL-based) contextual listings

Version 4.2.0

  • New attribute id.

Version 4.0.7

  • Can be used as a container tag.

Version 4.0.6

  • support added for comma separated list for category attribute
<txp:file_download_list /> 1 examples

Display the ten most popular downloads

<txp:file_download_list limit="10" break="li" wraptag="ul" sort="downloads desc" />

Styles could go this way

.file_download_list
{
	list-style-type:none;
}