• TypoScript Reference
    latest (9-dev)
  • Sitemap
  • Introduction
    • About this document
    • What's new
    • Credits
    • Feedback
    • General information
      • Case sensitivity
      • Version numbers
  • Data types
    • align
    • boolean
    • case
    • date-conf
    • degree
    • dir
    • function name
    • getText
      • field:
      • parameters:
      • register:
      • leveltitle, leveluid, levelmedia:
      • levelfield:
      • date:
      • page:
      • pagelayout:
      • current:
      • level:
      • GP:
      • getenv:
      • getIndpEnv:
      • TSFE:
      • DB:
      • file:
      • fullRootLine:
      • LLL:
      • path:
      • cObj:
      • session:
      • debug:
      • global:
      • flexform:
    • GraphicColor
    • HTML code
    • HTML-color
    • imageExtension
    • imgResource
    • integer
    • linkWrap
    • list
    • margins
    • Data types: Object types
      • cObject
      • frameObj
      • Gifbuilder Object
      • menu object
    • page_id
    • path
    • pixels
    • positive integer
    • resource
    • rotation
    • space
    • strftime-conf
    • string
    • <tag>
    • < tag >-data
    • < tag >-params
    • target
    • UNIX-time
    • VHalign
    • wrap
    • x,y,w,h
  • Objects and properties
    • Introduction
      • Reference to objects
    • Calc
      • Calculating values (+calc)
        • calc example:
    • optionSplit
      • Introduction
      • PHP-Code
      • Terminology
        • Mainparts
        • Subparts
      • Full example to see how it works
        • Three by three items
      • The optionSplit ruleset
      • More Examples
        • Three by two items
        • Three by one items
        • Two by three items
        • Two by two items
        • Two by one items
        • One by one items
        • One by two items
        • One by three items
        • One by four items
      • More examples: Tricky stuff
        • Three items A, no item R, three items Z
        • One item A, no item R, one items Z
        • One item A, one (unexpected!?) item R, one item Z
        • More
      • Test Code 1 (TypoScript)
      • Test Code 1 Result
      • Test Code 2 (TypoScript)
      • Test Code 2 Result
    • Objects and stdWrap
      • stdWrap example:
  • Conditions
    • About The Syntax Of Conditions
      • General syntax
        • Example
      • Trimming, braces and condition operators
        • Examples
          • Test day of month and month
          • Test day of month
          • Test month and day of month
    • Condition reference
      • language
        • Syntax:
        • Comparison:
      • IP
        • Syntax:
        • Comparison:
        • Examples:
      • hostname
        • Syntax:
        • Comparison:
      • applicationContext
        • Syntax:
        • Comparison:
        • Examples:
      • hour
        • Syntax:
        • Comparison:
        • Examples:
      • minute
        • Syntax:
        • Comparison:
      • month
        • Syntax:
        • Comparison:
      • year
        • Syntax:
        • Comparison:
      • dayofweek
        • Syntax:
        • Comparison:
      • dayofmonth
        • Syntax:
        • Comparison:
      • dayofyear
        • Syntax:
        • Comparison:
      • usergroup
        • Syntax:
        • Comparison:
        • Example:
      • loginUser
        • Syntax:
        • Comparison:
        • Example:
        • Example:
      • page
        • Syntax:
        • Comparison:
        • Example:
      • treeLevel
        • Syntax:
        • Comparison:
        • Example:
      • PIDinRootline
        • Syntax:
        • Comparison:
        • Example:
      • PIDupinRootline
        • Syntax:
        • Comparison:
      • compatVersion
        • Syntax:
        • Comparison:
      • globalVar
        • Syntax:
        • Comparison:
        • Examples:
      • globalString
        • Syntax:
        • Comparison:
        • Examples:
        • Important note on globalVar and globalString
        • Examples:
        • Examples:
      • Custom Conditions
        • Syntax:
        • Comparison:
        • Examples:
      • userFunc
        • Syntax:
        • Comparison:
        • Examples:
  • Functions
    • stdWrap
      • Content-supplying properties of stdWrap
      • Getting data
        • setContentToCurrent
        • addPageCacheTags
        • setCurrent
        • lang
        • data
        • field
        • current
        • cObject
        • numRows
        • preUserFunc
      • Override and conditions
        • override
        • preIfEmptyListNum
        • ifNull
        • ifEmpty
        • ifBlank
        • listNum
        • trim
        • strPad
        • stdWrap
        • required
        • if
        • fieldRequired
      • Parsing data
        • csConv
        • parseFunc
        • HTMLparser
        • split
        • replacement
        • prioriCalc
        • char
        • intval
        • hash
        • round
        • numberFormat
        • date
        • strftime
        • strtotime
        • age
        • case
        • bytes
        • substring
        • cropHTML
        • stripHtml
        • crop
        • rawUrlEncode
        • htmlSpecialChars
        • encodeForJavaScriptValue
        • doubleBrTag
        • br
        • brTag
        • encapsLines
        • keywords
        • innerWrap
        • innerWrap2
        • addParams
        • filelink
        • preCObject
        • postCObject
        • wrapAlign
        • typolink
        • wrap
        • noTrimWrap
        • wrap2
        • dataWrap
        • prepend
        • append
        • wrap3
        • orderedStdWrap
        • outerWrap
        • insertData
        • postUserFunc
        • postUserFuncInt
        • prefixComment
        • editIcons
        • editPanel
        • cache
        • debug
        • debugFunc
        • debugData
    • imgResource
      • ext
      • width
      • height
      • params
      • sample
      • noScale
      • crop
      • cropVariant
      • alternativeTempPath
      • frame
      • import
      • treatIdAsReference
      • maxW
      • maxH
      • minW
      • minH
      • stripProfile
      • Examples
    • imageLinkWrap
      • Properties
      • enable
      • file
      • width
      • height
      • effects
        • Example for effects
      • sample
      • alternativeTempPath
      • title
      • bodyTag
      • wrap
      • target
      • JSwindow
      • JSwindow.expand
      • JSwindow.newWindow
      • JSwindow.altUrl
      • JSwindow.altUrl_noDefaultParams
      • typolink
      • directImageLink
      • linkParams
      • stdWrap
      • What it does
      • Implementation
      • Examples for imageLinkWrap
        • Basic example: Create a link to the showpic script
        • Basic example: Link directly to the original image
        • Example: Larger display in a popup window
        • Example: Printlink
        • Example: Images in lightbox "fancybox"
        • Example: Images in lightbox "TopUp"
    • numRows
      • table
      • select
    • select
      • Comprehensive example
      • uidInList
      • pidInList
      • recursive
      • orderBy
      • groupBy
      • max
      • begin
      • where
      • languageField
      • includeRecordsWithoutDefaultTranslation
      • selectFields
      • join, leftjoin, rightjoin
      • markers
    • split
      • token
      • max
      • min
      • returnKey
      • returnCount
      • cObjNum
      • 1,2,3,4
      • wrap
      • Example:
    • replacement
      • search
      • replace
      • useRegExp
      • useOptionSplitReplace
      • Examples:
    • if
      • directReturn
      • isNull
      • isTrue
      • isFalse
      • isPositive
      • isGreaterThan
      • isLessThan
      • equals
      • isInList
      • value
      • negate
      • Explanation
      • Examples:
    • typolink
      • extTarget
      • fileTarget
      • target
      • no_cache
      • useCacheHash
      • additionalParams
      • addQueryString
      • wrap
      • ATagBeforeWrap
      • parameter
      • forceAbsoluteUrl
      • title
      • JSwindow_params
      • returnLast
      • section
      • ATagParams
      • linkAccessRestrictedPages
      • userFunc
      • Resource references
      • Handler syntax
        • page
        • file
        • folder
      • Using link handlers
    • encapsLines
      • encapsTagList
      • remapTag.[tagname]
      • addAttributes.[tagname]
      • removeWrapping
      • wrapNonWrappedLines
      • innerStdWrap_all
      • encapsLinesStdWrap.[tagname]
      • defaultAlign
      • nonWrappedTag
      • Example:
      • Example:
    • addParams
      • _offset
      • (array of strings)
      • Example:
    • 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
    • strPad
      • length
      • padWith
      • type
      • Examples:
    • round
      • roundType
      • decimals
      • round
        • Examples:
    • numberFormat
      • decimals
      • dec_point
      • thousands_sep
        • Examples:
    • parseFunc
      • externalBlocks
      • constants
      • short
      • plainTextStdWrap
      • userFunc
      • nonTypoTagStdWrap
      • nonTypoTagUserFunc
      • sword
      • makelinks
      • tags
      • allowTags
      • denyTags
      • if
      • Example:
    • makelinks
      • http.extTarget
      • http.wrap
      • http.ATagBeforeWrap
      • http.keep
      • http.ATagParams
      • mailto.wrap
      • mailto.ATagBeforeWrap
      • mailto.ATagParams
    • tags
      • (array of strings)
      • Example:
    • HTMLparser
      • allowTags
      • stripEmptyTags
      • stripEmptyTags.keepTags
      • tags.[tagname]
      • localNesting
      • globalNesting
      • rmTagIfNoAttrib
      • noAttrib
      • removeTags
      • keepNonMatchedTags
      • htmlSpecialChars
    • HTMLparser_tags
      • overrideAttribs
      • allowedAttribs
      • fixAttrib.[attribute].set
      • fixAttrib.[attribute].unset
      • fixAttrib.[attribute].default
      • fixAttrib.[attribute].always
      • fixAttrib.[attribute].range
      • fixAttrib.[attribute].list
      • fixAttrib.[attribute].removeIfFalse
      • fixAttrib.[attribute].removeIfEquals
      • fixAttrib.[attribute].casesensitiveComp
      • fixAttrib.[attribute].prefixLocalAnchors
      • fixAttrib.[attribute].prefixRelPathWith
      • fixAttrib.[attribute].userFunc
      • protect
      • remap
      • rmTagIfNoAttrib
      • nesting
    • cache
      • key
      • lifetime
      • tags
      • Examples:
      • cache as first-class function:
  • Setup
    • Top-level objects
      • ((abc ...?))
      • ((bcd ...?))
      • config
      • constants
      • FEData
      • Other reserved TLO's:
      • resources
      • sitetitle
      • types
    • plugin
      • Properties
      • userFunc
      • _CSS_DEFAULT_STYLE
      • _CSS_PAGE_STYLE
      • _DEFAULT_PI_VARS.[piVar-key]
      • _LOCAL_LANG.[lang-key].[label-key]
    • config
      • Properties
      • absRefPrefix
      • additionalHeaders
      • admPanel
      • ATagParams
      • baseURL
      • cache
      • cache_clearAtMidnight
      • cache_period
      • compressCss
      • compressJs
      • concatenateCss
      • concatenateJs
      • concatenateJsAndCss
      • content_from_pid_allowOutsideDomain
      • contentObjectExceptionHandler
      • debug
      • defaultGetVars
      • disableAllHeaderCode
      • disableBodyTag
      • disableCharsetHeader
      • disableImgBorderAttr
      • disablePageExternalUrl
      • disablePrefixComment
      • disablePreviewNotification
      • disableLanguageHeader
      • doctype
      • doctypeSwitch
      • enableContentLengthHeader
      • extTarget
      • fileTarget
      • forceTypeValue
      • formMailCharset
        • ftu
      • headerComment
      • htmlTag_dir
      • htmlTag_langKey
      • htmlTag_setParams
      • htmlTag_stdWrap
      • index_descrLgd
      • index_enable
      • index_externals
      • index_metatags
      • inlineStyle2TempFile
      • intTarget
      • language
      • language_alt
      • linkVars
      • locale_all
      • message_page_is_being_generated
      • message_preview
      • message_preview_workspace
      • metaCharset
      • moveJsFromHeaderToFooter
      • MP_defaults
      • MP_disableTypolinkClosestMPvalue
      • MP_mapRootPoints
      • namespaces
      • no_cache
      • noPageTitle
      • pageRendererTemplateFile
      • pageTitle
      • pageTitleFirst
      • pageTitleSeparator
      • removeDefaultCss
      • removeDefaultJS
      • removePageCss
      • sendCacheHeaders
      • sendCacheHeaders_onlyWhenLoginDeniedInBranch
      • spamProtectEmailAddresses
      • spamProtectEmailAddresses_atSubst
      • spamProtectEmailAddresses_lastDotSubst
      • sword_noMixedCase
      • sword_standAlone
      • sys_language_isocode
      • sys_language_isocode_default
      • sys_language_mode
      • sys_language_overlay
      • sys_language_uid
      • titleTagFunction
      • tx_[extension key with no underscores]_[*]
      • typolinkCheckRootline
      • typolinkEnableLinksAcrossDomains
      • typolinkLinkAccessRestrictedPages
      • typolinkLinkAccessRestrictedPages_addParams
      • USERNAME_substToken
      • USERUID_substToken
      • xhtmlDoctype
      • xmlprologue
    • constants
      • Properties
      • (array of keys)
    • PAGE
      • Properties
      • 1,2,3,4...
      • bodyTag
      • bodyTagAdd
      • bodyTagCObject
      • config
      • CSS_inlineStyle
      • cssInline
      • footerData
      • headerData
      • headTag
      • includeCSS.[array]
      • includeCSSLibs.[array]
      • includeJS.[array]
      • includeJSFooter.[array]
      • includeJSFooterlibs.[array]
      • includeJSLibs.[array]
      • inlineLanguageLabelFiles
      • inlineSettings
      • jsFooterInline
      • jsInline
      • meta
      • shortcutIcon
      • stdWrap
      • typeNum
      • wrap
    • meta
      • Properties
        • array of key names
    • carray
      • Properties
      • Property details
        • (stdWrap properties...)
        • (TDParams)
        • 1,2,3,4...
  • Content Objects (cObject)
    • General information
      • PHP information
      • REUSING cOBJECTS
        • Note:
        • Example:
    • CASE
      • Example:
    • COA, COA_INT
      • Examples:
    • CONTENT
      • Comprehensive example
      • select
      • table
      • renderObj
      • slide
      • wrap
      • stdWrap
      • CONTENT object example 1
      • CONTENT object example 2
    • EDITPANEL
      • Example:
    • FILE
      • Example:
    • FILES
      • Special key: "references"
      • Examples:
        • Usage with files
        • Usage with references
        • Usage with sliding
    • FLUIDTEMPLATE
      • Properties
        • templateName
        • template
        • file
        • templateRootPaths
        • layoutRootPath
        • layoutRootPaths
        • partialRootPath
        • partialRootPaths
        • format
        • extbase.pluginName
        • extbase.controllerExtensionName
        • extbase.controllerName
        • extbase.controllerActionName
        • variables
        • settings
        • dataProcessing
        • stdWrap
      • Example:
    • HMENU
      • Example:
      • The .special property
        • special = directory
        • special = list
        • special = updated
          • Example for special = updated:
        • special = rootline
          • Example for special = rootline:
        • special = browse
        • special = keywords
        • special = categories
        • special = language
          • Example:
        • special = userfunction
          • Example: Creating hierarchical menus of custom links
    • IMAGE
      • layoutKey
      • layout
      • layout.layoutKey
      • layout.layoutKey.element
      • layout.layoutKey.source
      • sourceCollection
      • dataKey
      • dataKey.if
      • dataKey.pixelDensity
      • dataKey.width
      • dataKey.height
      • dataKey.maxW
      • dataKey.maxH
      • dataKey.minW
      • dataKey.minH
      • dataKey.quality
      • dataKey.*
      • Examples:
        • Standard rendering
        • Responsive/adaptive rendering
    • IMG_RESOURCE
    • LOAD_REGISTER
      • Example:
    • RECORDS
      • Properties
      • Introduction
      • Property details
        • source
        • categories
        • tables
        • conf
        • dontCheckPid
        • wrap
        • stdWrap
      • Examples
        • Selection with source
        • Selection with source II
        • Selection with categories
    • RESTORE_REGISTER
      • Example:
    • SVG
      • Example:
    • TEMPLATE
      • Example:
    • TEXT
      • Examples:
    • USER and USER_INT
      • userFunc
      • (properties you define)
      • stdWrap
      • Examples:
        • Example 1
        • Example 2
        • Example 3
        • Example 4
  • GIFBUILDER
    • GIFBUILDER
      • Note on (+calc)
      • The "_GIFBUILDER" Top Level Object
    • Object names in this section
      • TEXT
      • SHADOW
      • EMBOSS
      • OUTLINE
      • BOX
      • ELLIPSE
        • Example:
      • IMAGE
      • EFFECT
        • Syntax:
        • Example:
      • WORKAREA
      • CROP
      • SCALE
      • ADJUST
        • Example:
    • NON-Gifbuilder Objects
      • IMGMAP
  • MENU Objects
    • Common properties
      • showAccessRestrictedPages
    • Common item states for TMENU, GMENU and IMGMENU
    • [menu object].sectionIndex
      • The data-record /Behind the scene
    • GMENU
      • Additional properties for Menu item states
    • TMENU
    • TMENUITEM
    • IMGMENU
    • IMGMENUITEM
  • Appendix A – PHP include scripts
    • Including your script
      • $content
      • $conf
      • White spaces
      • $GLOBALS['TSFE']->set_no_cache()
        • Example:
      • $this->cObjGetSingle(value, properties)
        • Example:
      • $this->stdWrap(value, properties)
        • Example:
      • Internal variables in the main frontend object, TSFE
      • Global variables
  • Linktargets
    • Targets For Cross-Referencing
 
TypoScript Reference
  • Docs »
  • Functions »
  • filelink
  • Edit me on GitHub

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 or "useAlt" 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:
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 (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).

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>
}
Next Previous

View page source

© Copyright since 2000 by the TYPO3 Documentation Team

Last rendered on Apr 14, 2018 22:48

Built with Sphinx and t3SphinxThemeRtd. Report theme issues here.

Legal Info

Versions
Project
Home
Contact
Discussions
Issues
Repository
Downloads
Related Links v: latest (9-dev)