TYPO3 Logo
TypoScript Reference
Release: 8.7

Loading data.

  • Introduction
  • Using and setting TypoScript
    • Entering and structuring TypoScript templates
    • Constants
    • The Constant Editor
    • Register
    • Debugging / Analyzing
  • Simple data types
    • align
    • boolean
    • case
    • date-conf
    • degree
    • dir
    • function name
    • getText
    • GraphicColor
    • HTML code
    • HTML-color
    • imageExtension
    • imgResource
    • integer
    • linkWrap
    • list
    • margins
    • 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
  • Top-level objects
    • CONFIG & config
    • constants
    • _GIFBUILDER
    • module
    • PAGE & page
    • plugin
    • temp, styles & lib
    • tt_*
    • resources
    • sitetitle
    • types
  • cObject
    • Content objects (general information)
    • CASE
    • COA, COA_INT
    • CONTENT
    • EDITPANEL
    • FILE
    • FILES
    • FLUIDTEMPLATE
    • 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
    • TMENU
    • TMENUITEM
    • IMGMENU
    • IMGMENUITEM
    • JSMENU
    • JSMENUITEM
  • Other Object Types
    • carray
    • meta
    • GIFBUILDER
      • GIFBUILDER
      • Object names in this section
      • NON-Gifbuilder Objects
  • Functions
    • addParams
    • cache
    • Calc
    • encapsLines
    • filelink
    • Filelink Example
    • HTMLparser
    • HTMLparser_tags
    • if
    • imageLinkWrap
    • imgResource
    • makelinks
    • numberFormat
    • numRows
    • optionSplit
    • parseFunc
    • replacement
    • round
    • select
    • split
    • strPad
    • stdWrap
    • tags
    • typolink
  • Conditions
    • About The Syntax Of Conditions
    • Condition reference
  • Appendix A – PHP include scripts
  • Glossary
  • About This Manual
  • Sitemap
  • Index

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
View source How to edit Edit 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 =
   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 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¶

?

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
  • Issues
  • Repository

Last updated: Mar 27, 2022 07:28

Last rendered: Mar 27, 2022 07:28

TYPO3 Theme 4.6.2

© Copyright since 2012 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy