TSref/filelink

From TYPO3Wiki

Jump to: navigation, search
TSref/filelink
Translations info
An english page for every translation.
All pagenames in english.

  en       de   nl   fr   ja   zh  

TypoScript This page is document in progress.


other Typoscript functions

filelink

Input is a filename in the path "path".

icon, size and file is rendered in the listed order.

Property: Data type: Description: Default:
path path /stdWrap Example:
"uploads/media/"
icon boolean /stdWrap Set if icon should be shown
icon_image_ext_list list of imageextensions This is the extensions that should render as thumbsnails instead of icons.
iconCObject cObject Enter a cObject to use alternatively for the icons, eg. IMAGE type.

If this is set, it'll substitute the use of the thumbs-script for display of thumbnails.

icon_link boolean If the icon should be linked also
labelStdWrap stdWrap stdWrap options for the label (by default the label is the filename) before being wrapped with the A-tags.

Use this to eg. import another label from a database field or such.

wrap wrap Wraps the links.
ATagBeforeWrap boolean If set, the link is first wrapped with ".wrap" and then the <A>-tag.
file stdWrap stdWrap of the label (by default the label is the filename) after having been wrapped with A-tag!
size boolean /stdWrap Set if size should be shown
jumpurl boolean Decides if the link should call the script with the jumpurl paramter in order to register any clicks in the stat.

This has the advantage that any clicks on the file will register in the stat.

The disadvantage is, that users cant right-click and select "Save Target As" in the browser.

Properties:

.secure (boolean)If set, then the file pointed to by jumpurl is NOT redirected to, but rather it's read from the file and returned with a correct header. This option adds a hash and locationData to the url and there MUST be access to the record in order to download the file. If the fileposition on the server is furthermore secured by a .htaccess file preventing ANY access, you've got secure download here!

.secure.mimeTypes (list of mimetypes, syntax [ext] = [mimetype]

Example:
.secure = 1
.secure.mimeTypes = pdf=application/pdf, doc=application/msword
target target
stdWrap stdWrap
ATagParams <A>-params /stdWrap Additional parameters
Example:
class=”board”
removePrependedNumbers boolean if set, any 2-digit prepended numbers (“eg _23”) in the filename is removed.
altText

titleText

string /stdWrap For icons (image made with "iconCObject" must have their own properties)

If no titltext is specified, it will use the alttext insteadIf no alttext is specified, it will use an empty alttext

longdescURL string /stdWrap For icons (image made with "iconCObject" must have their own properties)

"longdesc" attribute (URL pointing to document with extensive details about image).

[tsref:->filelink]

#Example:
   1.filelink {
     path = uploads/media/
     icon = 1
     icon.wrap = <td> | </td>
     size = 1
     size.wrap = <td> | </td>
     file.fontTag = {$styles.content.uploads.wrap}
     file.wrap = <td> | </td>
     jumpurl = 1
     target = _blank
     stdWrap = <tr> | </tr>
   }
Personal tools