Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Add missing t3:// link handlers #216

Merged
merged 3 commits into from
Aug 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 79 additions & 3 deletions Documentation/Functions/Typolink.rst
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,9 @@ Resource handler key (`page`)
- page
- file
- folder
- email
- url
- record

More keys can be added via :php:`$GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler']` in
an associative array where the key is the handler key and the value is a
Expand Down Expand Up @@ -590,7 +593,7 @@ The page identifier is a compound string based on several optional settings.

`t3://page?uid=13&type=3#c123`

`t3://page?uid=13&type3?my=param&will=get&added=here#c123`
`t3://page?uid=13&type=3&my=param&will=get&added=here#c123`

file
----
Expand All @@ -603,9 +606,12 @@ file

:aspect:`identifier` (string):

The identifier of a file when not indexed in FAL.
The identifier of a file using combined `<storage>:<path>` reference or a direct
reference to one file like `fileadmin/path/myfile.jpg`.

`t3://file?identifier=folder/myfile.jpg`
`t3://file?identifier=1:/path/myfile.jpg`

`t3://file?identifier=fileadmin/path/myfile.jpg`

folder
------
Expand All @@ -622,7 +628,77 @@ folder

`t3://folder?storage=1&identifier=myfolder`

email
-----

:aspect:`email` (string):

Mail address to be used, prefixed with `mailto:`

`t3://email?email=mailto:[email protected]`

url
---

:aspect:`url` (string):

URL to be used, if no scheme is used `http://` is prefixed automatically. Query parameters have to be URL-encoded.

`t3://url?url=example.org`

`t3://url?url=https://example.org`

`t3://url?url=https://example.org%26parameter=value`

record
------

Aspects `identifier` and `uid` are mandatory for this link handler.

:aspect:`identifier` (string):

The (individual) identifier of the link building configuration to be used.

:aspect:`uid` (int):

The UID of the referenced record to be linked.

:aspect:`Example`

The following reference relates to record `tx_myextension_content:123`. Tablename is retrieved
from Page TSconfig settings, actual link generation is defined in TypoScript configuration for
identifier `my_content`.

`t3://record?identifier=my_content&uid=123`

.. code-block:: typoscript
:caption: Page TSconfig definition for identifier `my_content`

TCEMAIN.linkHandler.my_content {
handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler
label = LLL:EXT:my_extension/Resources/Private/Language/locallang.xlf:link.customTab
configuration {
table = tx_myextension_content
}
scanBefore = page
}

.. code-block:: typoscript
:caption: Frontend TypoScript definition for identifier `my_content`

config.recordLinks.my_content {
// Do not force link generation when the record is hidden
forceLink = 0

typolink {
// pages.uid to be used to render result (basically it contains the rendering plugin)
parameter = 234
// field values of tx_myextension_content record with uid 123
additionalParams.data = field:uid
additionalParams.wrap = &tx_myextension[uid]= | &tx_myextension[action]=show
useCacheHash = 1
}
}


.. _typolink-link-handler:
Expand Down