TYPO3 Logo
A TYPO3 Extbase and Fluid Guide
Release: 8.7

Loading data.

  • ViewHelpers
    • ViewHelpers for the TYPO3 backend
      • ViewHelper: Buttons
        • f:be.buttons.csh
        • f:be.buttons.shortcut
      • ViewHelper: Menus
        • f:be.menus.actionMenu
        • f:be.menus.actionMenuItem
        • f:be.menus.actionMenuItemGroup
      • ViewHelper: Security
        • f:be.security.ifAuthenticated
        • f:be.security.ifHasRole
      • ViewHelper: Widget
        • f:be.widget.paginate
      • f:be.container
      • f:be.infobox
      • f:be.pageInfo
      • f:be.pagePath
      • f:be.pageRenderer
      • f:be.tableList
    • ViewHelper: Debug
    • ViewHelper: Form
      • f:form.abstractForm
      • f:form.abstractFormField
      • f:form.button
      • f:form.checkbox
      • f:form.hidden
      • f:form.password
      • f:form.radio
      • f:form.select
      • ViewHelper: Form/Select
      • f:form.submit
      • f:form.textarea
      • f:form.textfield
      • f:form.validationResults
      • Examples
    • ViewHelper: Format
      • f:format.bytes
      • f:format.case
      • f:format.crop
      • f:format.currency
      • f:format.date
      • f:format.html
      • f:format.htmlentities
      • f:format.htmlentitiesDecode
      • f:format.json
      • f:format.nl2br
      • f:format.number
      • f:format.padding
      • f:format.stripTags
      • f:format.urlencode
    • ViewHelper: Link
      • f:link.action
      • f:link.email
      • f:link.external
      • f:link.page
      • f:link.typolink
    • ViewHelper: Security
      • f:security.ifAuthenticated
      • f:security.ifHasRole
    • ViewHelper: Uri
      • f:uri.action
      • f:uri.email
      • f:uri.external
      • f:uri.image
      • f:uri.page
      • f:uri.resource
      • f:uri.typolink
    • ViewHelper: Widgets
      • f:widget.autocomplete
      • f:widget.link
      • f:widget.paginate
      • f:widget.uri
    • f:alias
    • f:base
    • f:case
    • f:cObject
    • f:comment
    • f:count
    • f:cycle
    • f:debug
    • f:else
    • f:escape
    • f:flashMessages
    • f:for
    • f:form
    • f:groupedFor
    • f:if
    • f:image
    • f:layout
    • f:or
    • f:render
    • f:renderChildren
    • f:renderFlashMessages
    • f:section
    • f:spaceless
    • f:switch
    • f:then
    • f:translate
    • f:variable

PAGE CONTENTS

  • f:link.typolink
    • Properties
      • parameter
      • target
      • class
      • title
      • additionalParams
      • additionalAttributes
      • useCacheHash
      • addQueryString
      • addQueryStringMethod
      • addQueryStringExclude
      • absolute
    • Example
  1. Start
  2. ViewHelpers
  3. ViewHelper: Link
  4. f:link.typolink
Edit on GitHub View source

f:link.typolink¶

A ViewHelper to create links from fields supported by the link wizard.

Properties¶

parameter¶

Variable type
String
Description
UID of the target page to link to. TypoScript-Syntax is expected like 19 _blank. See typolink
Default value
NULL
Mandatory
Yes

target¶

Variable type
String
Description
What Window shall be used to open the link?
Default value
Empty string
Mandatory
No

class¶

Variable type
String
Description
The class to be added to the link.
Default value
Empty string
Mandatory
No

title¶

Variable type
String
Description
The title attribute of the link.
Default value
Empty string
Mandatory
No

additionalParams¶

Variable type
String
Description
Add more parameters to the link. Opposed to arguments these names will not be prefixed with the extension name.
Default value
Empty string
Mandatory
No

additionalAttributes¶

Variable type
Array
Description
To add attributes to the ‘ATag’. The array will automatically be converted to TypoScript syntax Param1=Wert Param2=Wert
Default value
Empty array
Mandatory
No

useCacheHash¶

Variable type
Boolean

Description

Default value
FALSE
Mandatory
No

addQueryString¶

Variable type
Boolean
Description
If set, the current query parameters will be kept in the URI.
Default value
FALSE
Mandatory
No

addQueryStringMethod¶

Variable type
String
Description

If set to GET or POST, then the parsed query arguments (GET or POST data) will be used. This setting is useful, if you use URL processing extensions like Real URL, which translate part of the path into query arguments.

It’s also possible to get both, POST and GET data, on setting this to

“POST,GET” or “GET,POST”. The last method in this sequence takes precedence and overwrites the parts that are also present for the first method.

Default value
GET
Mandatory
No

addQueryStringExclude¶

Variable type
Boolean
Description
List of query arguments to exclude from the link. Typical examples are ‘L’ or ‘cHash’.
Default value
Empty string
Mandatory
No

absolute¶

Variable type
Boolean
Description
If set, the URI of the rendered link is absolute.
Default value
GET
Mandatory
No

Example¶

<f:link.typolink parameter="{link}">Linktext</f:link.typolink>

We assume that {link} has the string value 19 _blank - "testtitle with whitespace" &X=y. The linkwizzard in the backend for example uses strings like this.

Result

<a href="index.php?id=19&X=y" title="testtitle with whitespace" target="_blank">Linktext</a>
<f:link.typolink parameter="{link}" target="_blank" class="ico-class"
 title="some title" additionalParams="&u=b" additionalAttributes="{type:'button'}"
 >Linktext</f:link.typolink>

Result

<a href="index.php?id=19&X=y&u=b" title="some title" target="_blank"
class="ico-class" type="button">Linktext</a>
  • Previous
  • Next
  • Home
  • Discussions
  • Issues
  • Repository

Last updated: Nov 10, 2018 12:59

Last rendered: Jan 22, 2021 09:09

TYPO3 Theme 4.4.3

© Copyright by the authors since ever
  • Legal Notice
  • Privacy Policy