TYPO3 Logo
Fluid ViewHelper Reference
Release: main

Loading data.

  • typo3/backend
    • link
      • link.editRecord
      • link.newRecord
    • mfa
      • mfa.ifHasState
    • toolbar
      • toolbar.attributes
      • toolbar.ifHasDropdown
    • typoScript
      • typoScript.fineDiff
    • uri
      • uri.editRecord
      • uri.newRecord
    • avatar
    • languageColumn
    • moduleLink
    • thumbnail
  • typo3/core
    • iconForRecord
    • iconForResource
    • icon
    • normalizedUrl
  • typo3/fluid
    • asset
      • asset.css
      • asset.script
    • be
      • menus
        • be.menus.actionMenuItemGroup
        • be.menus.actionMenuItem
        • be.menus.actionMenu
      • security
        • be.security.ifAuthenticated
        • be.security.ifHasRole
      • be.infobox
      • be.link
      • be.pageInfo
      • be.pagePath
      • be.pageRenderer
      • be.tableList
      • be.uri
    • debug
      • debug.render
    • form
      • select
        • form.select.optgroup
        • form.select.option
      • form.button
      • form.checkbox
      • form.countrySelect
      • form.hidden
      • form.password
      • form.radio
      • form.select
      • form.submit
      • form.textarea
      • form.textfield
      • form.upload
      • form.validationResults
    • format
      • format.bytes
      • format.case
      • format.crop
      • format.currency
      • format.date
      • format.html
      • format.htmlentitiesDecode
      • format.htmlentities
      • format.json
      • format.nl2br
      • format.number
      • format.padding
      • format.stripTags
      • format.trim
      • format.urlencode
    • link
      • link.action
      • link.email
      • link.external
      • link.file
      • link.page
      • link.typolink
    • sanitize
      • sanitize.html
    • security
      • security.ifAuthenticated
      • security.ifHasRole
      • security.nonce
    • transform
      • transform.html
    • uri
      • uri.action
      • uri.external
      • uri.image
      • uri.page
      • uri.resource
      • uri.typolink
    • cObject
    • debug
    • flashMessages
    • form
    • image
    • media
    • render
    • translate
  • typo3fluid/fluid
    • cache
      • cache.disable
      • cache.static
      • cache.warmup
    • format
      • format.cdata
      • format.htmlspecialchars
      • format.printf
      • format.raw
    • alias
    • case
    • comment
    • count
    • cycle
    • debug
    • defaultCase
    • else
    • for
    • groupedFor
    • if
    • inline
    • layout
    • or
    • render
    • section
    • spaceless
    • switch
    • then
    • variable
  • Contribution
  • Sitemap
  • Index

PAGE CONTENTS

  • link.typolink
    • Example
      • Minimal usage
      • TextWrap usage
      • Full parameter usage
    • Arguments
      • parameter
      • target
      • class
      • title
      • language
      • additionalParams
      • additionalAttributes
      • addQueryString
      • addQueryStringExclude
      • absolute
      • parts-as
      • textWrap
  1. Start
  2. typo3/fluid
  3. link
  4. link.typolink
View source

Display settings


Color scheme of code blocks:


link.typolink¶

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

Example¶

{link} contains: t3://page?uid=2&arg1=val1#9 _blank some-css-class "Title containing Whitespace".

Or a legacy version from older TYPO3 versions: {link} contains: 9 _blank - "testtitle with whitespace" &X=y.

Minimal usage¶

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

Output:

<a href="/page/path/name.html?X=y" title="testtitle with whitespace" target="_blank">
   Linktext
</a>

Depending on current page, routing and page path configuration.

TextWrap usage¶

<f:link.typolink parameter="123" textWrap="<span>|</span>"/>

Output:

<a href="/some/page">
   <span>Page title of some page wrapped in span</span>
</a>

Depending on current page, routing and page path configuration.

Full parameter usage¶

<f:link.typolink parameter="{link}" additionalParams="&u=b"
    target="_blank"
    class="ico-class" title="some title"
    additionalAttributes="{type:'button'}"
>
   Linktext
</f:link.typolink>

Output:

<a href="/page/path/name.html?X=y&u=b" title="some title" target="_blank" class="ico-class" type="button">
    Linktext
</a>

Depending on routing and page path configuration.

Arguments¶

parameter¶

DataType

string

Required

true

Description

StdWrap.typolink style parameter string

target¶

DataType

string

Required

false

Description

Define where to display the linked URL

class¶

DataType

string

Required

false

Description

Define classes for the link element

title¶

DataType

string

Required

false

Description

Define the title for the link element

language¶

DataType

string

Required

false

Description

Link to a specific language - defaults to the current language, use a language ID or "current" to enforce a specific language

additionalParams¶

DataType

string

Required

false

Description

Additional query parameters to be attached to the resulting URL

additionalAttributes¶

DataType

mixed

Default

array ()

Required

false

Description

Additional tag attributes to be added directly to the resulting HTML tag

addQueryString¶

DataType

string

Required

false

Description

If set, the current query parameters will be kept in the URL. If set to "untrusted", then ALL query parameters will be added. Be aware, that this might lead to problems when the generated link is cached.

addQueryStringExclude¶

DataType

string

Required

false

Description

Define parameters to be excluded from the query string (only active if addQueryString is set)

absolute¶

DataType

mixed

Required

false

Description

Ensure the resulting URL is an absolute URL

parts-as¶

DataType

string

Default

'typoLinkParts'

Required

false

Description

Variable name containing typoLink parts (if any)

textWrap¶

DataType

string

Required

false

Description

Wrap the link using the typoscript "wrap" data type

  • Previous
  • Next
  • Home
  • Contact
  • Issues
  • Repository

Page last updated: Sep 22, 2023 01:23

Last rendered: Sep 22, 2023 01:24

  • TYPO3 Theme 4.9.0
  • DRC v3.2.1
© Copyright since 2018 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy
  • Code of Conduct