The #FICHIER
tag (since SPIP 1.8.2) displays the relative URL of the document [1]; for example: IMG/pdf/my_document.pdf.
To extract just the name of the file, we can apply the filter: |basename
: [(#FICHIER|basename)]
(will display my_document.pdf
).
An interesting usage of this tag is obtained by combining it with the |image_reduire
filter, as part of a portfolio used to display thumbnail images rather than logos; for example, by using
[<a
href="#URL_DOCUMENT">(#FICHIER|image_reduire{500}) </a>]