Attention
TYPO3 v9 has reached its end-of-life September 30th, 2021 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
You can order Extended Long Term Support (ELTS) here: TYPO3 ELTS.
filelink¶
Warning
filelink
is deprecated since version 9 and will be removed in version 10.
Use DataProcessors or Fluid Styled Content instead.
- 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:
- Description:
For icons (image made with iconCObject must have their own properties). If no altText is specified, it will use an empty altText.
ATagBeforeWrap¶
ATagParams¶
- Property:
ATagParams
- Data type:
- Description:
Additional parameters
- Example:
class="board"
emptyTitleHandling¶
file¶
- Property:
file
- Data type:
- Description:
stdWrap of the label after having been wrapped with A-tag.
- Default:
The label is the filename.
icon¶
- Property:
icon
- Data type:
- Overview:
1.filelink { icon = 1 icon { path = ext = widthAttribute = heightAttribute = 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: 18
heightAttribute
Height of the icons in pixels. Default: 16
icon_link¶
- Property:
icon_link
- Data type:
- 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:
- 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:
- 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:
- Description:
stdWrap options for the label before being wrapped with the A-tags. Use this to for example import another label from a database field or such.
- Default:
The label is the filename.
longdescURL¶
- Property:
longdescURL
- Data type:
- 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:
- Description:
If set, any 2-digit appended(!) numbers in the filename are removed.
- Example:
If set,
filename_23.gif
becomesfilename.gif
.
titleText¶
tbd.
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>
}