TYPO3 Logo
TypoScript Template Reference
Release: 9.5

Loading data.

  • Introduction
  • Glossary
  • Using and setting TypoScript
    • Add TypoScript in the backend
    • Add TypoScript in your extension
    • Constants
    • The Constant Editor
    • Register
    • Debugging / Analyzing
  • Simple data types
  • Top-level objects
    • CONFIG & config
    • constants
    • _GIFBUILDER
    • module
    • PAGE
    • plugin
    • temp, styles & lib
    • tt_*
    • resources
    • sitetitle
    • types
  • cObject
    • Content objects (general information)
    • CASE
    • COA, COA_INT
    • CONTENT
    • EDITPANEL
    • FILE
    • FILES
    • FLUIDTEMPLATE
      • dataProcessing
    • HMENU
    • IMAGE
    • IMG_RESOURCE
    • LOAD_REGISTER
    • RECORDS
    • RESTORE_REGISTER
    • SVG
    • TEMPLATE
    • TEXT
    • USER and USER_INT
  • MENU
    • Common properties
    • Common item states for TMENU, GMENU and IMGMENU
    • [menu object].sectionIndex
    • GMENU
    • GMENUITEM
    • TMENU
    • TMENUITEM
    • IMGMENU
    • IMGMENUITEM
  • GIFBUILDER
    • GIFBUILDER
    • Object names in this section
    • NON-Gifbuilder Objects
  • Functions
    • addParams
    • cache
    • Calc
    • encapsLines
    • filelink
    • getEnv
    • HTMLparser
    • HTMLparser_tags
    • if
    • imageLinkWrap
    • imgResource
    • makelinks
    • numberFormat
    • numRows
    • optionSplit
    • parseFunc
    • replacement
    • round
    • select
    • split
    • stdWrap
    • strPad
    • tags
    • typolink
  • Conditions
  • Appendix A – PHP include scripts
  • About This Manual
  • Sitemap
  • Linktargets

PAGE CONTENTS

  • filelink
    • altText
    • ATagBeforeWrap
    • ATagParams
    • emptyTitleHandling
    • file
    • icon
    • icon_link
    • icon_image_ext_list
    • icon_thumbSize
    • iconCObject
    • labelStdWrap
    • longdescURL
    • path
    • removePrependedNumbers
    • size
    • stdWrap
    • target
    • titleText
    • typolinkConfiguration
    • wrap
    • Filelink Example
  1. Start
  2. Functions
  3. filelink
Edit on GitHub View source

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:
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 or
useAlt
To use the alt attribute instead.
Default:
useAlt

file¶

Property:
file
Data type:
stdWrap
Description:
stdWrap of the label after having been wrapped with A-tag.
Default:
The label is the filename.

icon¶

Property:
icon
Data type:
boolean / stdWrap
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 file css.gif will be used by default. If for a certain filetype no icon file is found in icon.path, the file default plus extension (for example default.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:
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 of icon_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 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:
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).

path¶

Property:
path
Data type:
path / stdWrap
Example:
path = "uploads/media/

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 becomes filename.gif.

size¶

Property:
size
Data type:
boolean / stdWrap
Description:
Set if size should be shown

stdWrap¶

Property:
stdWrap
Data type:
stdWrap

target¶

Property:
target
Data type:
target / stdWrap
Description:
Target for the <a>-tag.

titleText¶

tbd.

typolinkConfiguration¶

Property:
typolinkConfiguration
Data type:
typolink
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.

wrap¶

Property:
wrap
Data type:
wrap / stdWrap
Description:
Wraps the links.

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>
}
  • Previous
  • Next
  • Home
  • Contact
  • Discussions
  • Issues
  • Repository

Last updated: Aug 16, 2019 11:48

Last rendered: Feb 17, 2021 18:06

TYPO3 Theme 4.4.3

© Copyright since 2000 by the TYPO3 Documentation Team
  • Legal Notice
  • Privacy Policy