File download

On this page:

Syntax

<txp:file_download />

The file_download tag is a single tag which Textpattern will replace with Textpattern ‘file’ type Form templates. Inside that form go the other @@file tags@@.

Attributes

Tag will accept the following attributes (case-sensitive):

filename="name"
Filename of the file to link to.
Default: unset (nothing is returned).
form="form name"
Use specified form template to process the files.
Default: files.
id="integer"
File id of the file to link to.
Default: unset (nothing is returned).

Examples

Example 1: Display a download form

<txp:file_download form="new-files" id="1" />

Gets file with id of 1 and displays results using new-files form.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please write an issue and we’ll fix it.