Attention
TYPO3 v8 has reached its end-of-life March 31st, 2020 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.
filelink¶
- Function:
filelink
- Description:
Creates a list of file links. Input is a filename specified in
path
. icon, size and file are rendered in the listed order.- Overview:
1.filelink { altText = ATagBeforeWrap = ATagParams = emptyTitleHandling = file = icon = icon_link = icon_image_ext_list = icon_thumbSize = iconCObject = labelStdWrap = longdescURL = path = removePrependedNumbers = size = = stdWrap = target = # titleText ? titleText = typolinkConfiguration = wrap = }
altText¶
- Property:
altText
- Data type:
string /stdWrap
- Description:
For icons (image made with "iconCObject" must have their own properties). If no alttext is specified, it will use an empty alttext
ATagBeforeWrap¶
- Property:
ATagBeforeWrap
- Data type:
boolean
- Description:
If set, the link is first wrapped with ".wrap" and then the <A>-tag.
- Default:
0
ATagParams¶
- Property:
ATagParams
- Data type:
<A>-params /stdWrap
- Description:
Additional parameters
- Example:
class="board"
emptyTitleHandling¶
- Property:
emptyTitleHandling
Data type: string /stdWrap
- Description:
Value can be
keepEmpty
to preserve an empty title attribute oruseAlt
to use the alt attribute instead.- Default:
useAlt
file¶
- Property:
file
- Data type:
->stdWrap
- Description:
stdWrap of the label (by default the label is the filename) after having been wrapped with A-tag!
icon¶
- Property:
icon
- Data type:
- Overview:
1.filelink { icon = 1 icon.path = icon.ext = icon.widthAttribute = icon.heightAttribute = icon.stdWrap { # ... ] }
- Description:
Set, if an icon should be shown.
The filename of the icon used is the one of the filetype of the file given in path (see above) plus extension (by default
.gif
). For example for CSS files the icon filecss.gif
will be used by default. If for a certain filetype no icon file is found inicon.path
, the filedefault
plus extension (for exampledefault.gif
) will be used.The following sub-properties are available and have stdWrap functionality:
path
:Path to the icon set. Default is
typo3/sysext/frontend/Resources/Public/Icons/FileIcons/
.
ext
: File extension of icons. Default is.gif
.widthAttribute
: Width of the icons in pixels. Default: 18heightAttribute
Height of the icons in pixels. Default: 16
icon_link¶
- Property:
icon_link
- Data type:
boolean
- Description:
Set if the icon should be linked as well.
- Default:
0
icon_image_ext_list¶
- Property:
icon_image_ext_list
- Data type:
list of image extensions /stdWrap
- Description:
This is a comma-separated list of those file extensions that should render as thumbnails instead of icons.
icon_thumbSize¶
- Property:
icon_thumbSize
- Data type:
string /stdWrap
- Description:
Defines the size of the thumbnail in pixels.
icon
needs to be set for the option to take effect and the file extension of the image file must be part oficon_image_ext_list
. You can set one or two values, see the examples. If you set two values, the first value will define the maximum width and the second one the maximum height. The aspect ratio of the original image will be preserved.- Examples:
icon_thumbSize = 150 icon_thumbSize = 40x40
iconCObject¶
- Property:
iconCObject
- Data type:
cObject
- Description:
Enter a cObject to use alternatively for the icons, for example IMAGE type. If this is set, it will substitute the use of the thumbs-script for display of thumbnails.
labelStdWrap¶
- Property:
labelStdWrap
- Data type:
->stdWrap
- Description:
stdWrap options for the label (by default the label is the filename) before being wrapped with the A-tags. Use this to for example import another label from a database field or such.
longdescURL¶
- Property:
longdescURL
- Data type:
string /stdWrap
- Description:
For icons (image made with "iconCObject" must have their own properties). "longdesc" attribute (URL pointing to document with extensive details about image).
removePrependedNumbers¶
- Property:
removePrependedNumbers
- Data type:
boolean
- Description:
If set, any 2-digit appended(!) numbers in the filename are removed.
- Example:
If set,
filename_23.gif
becomesfilename.gif
.
stdWrap¶
- Property:
stdWrap
- Data type:
->stdWrap
titleText¶
?
typolinkConfiguration¶
- Property:
typolinkConfiguration
- Data type:
- Description:
This property can be used to pass additional typolink settings for the generated file link. Please note that the following properties will be ignored because they are set by the filelink function:
ATagParams
,fileTarget
,parameter
,title
.
Filelink Example¶
1.filelink {
path = uploads/media/
icon = 1
icon.wrap = <td> | </td>
size = 1
size.wrap = <td> | </td>
file.wrap = <td> | </td>
target = _blank
stdWrap = <tr> | </tr>
}