#100404Link-Selector-Popup in backend module should be extendable with custom link handlers
Description
Currently you can create custom link handlers and register them through PageTS and they are available throughout the whole page tree.
But there seems no possibility to do the same for modules which do not depend on the page tree and therefore on PageTS, like EXT:redirects. Or I’m not able to find the documentation for that.
It would be great if the link selector popup inside the EXT:redirects backend module is also extendable with custom link handlers so one has the possibility to create redirects to detail pages for records for example.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 4
-
Nikolas Hagelstein commented <span data-processor="relativetime" data-value="2023-07-13T09:45:46+00:00" > 07/13/23, 09:45 </span>
-
Peter Kraume commented <span data-processor="relativetime" data-value="2023-12-06T21:21:25+00:00" > 12/06/23, 21:21 </span>
For me, the custom link handler for records works (in TYPO3 11.5.33). Here is a configuration example:
TCEMAIN.linkHandler { references { handler = TYPO3\CMS\Recordlist\LinkHandler\RecordLinkHandler label = LLL:EXT:references/Resources/Private/Language/locallang.xlf:linkHandler.tab.references configuration { table = tx_references_domain_model_reference storagePid = 12345 hidePageTree = 1 } } }Important is, that the storagePid is hard coded in TSConfig because using constants, e.g. from the site configuration, don’t work here.
-
Peter Kraume changed Related to #103205 <span data-processor="relativetime" data-value="2024-02-26T13:26:30+00:00" > 02/26/24, 13:26 </span>
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-19T08:04:57+00:00" > 11/19/26, 08:04 </span>This works with the current Core, no code change needed.
The link browser reads its handlers from the page TSconfig of the page the record is on.
sys_redirectrecords are usually stored on pid 0, where only the global page TSconfig applies: theConfiguration/page.tsconfigof every extension, plus$GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig']. A link handler registered there shows up in the link browser of the Redirects module, too.Example for
EXT:my_sitepackage/Configuration/page.tsconfig:TCEMAIN.linkHandler.tx_news { handler = TYPO3\CMS\Backend\LinkHandler\RecordLinkHandler label = News configuration { table = tx_news_domain_model_news storagePid = 42 hidePageTree = 1 } scanAfter = page }handlerisTYPO3\CMS\Backend\LinkHandler\RecordLinkHandlersince v12 (formerly in EXT:recordlist).storagePidmust be a fixed number. Page TSconfig from a site or site set does not reach pid 0, so site settings and constants are not available there.scanAfter = pagemakes the link browser detect existingt3://recordlinks as this handler.
The redirect needs the matching frontend TypoScript with the same identifier to resolve the record link:
config.recordLinks.tx_news { typolink { parameter = 17 additionalParams.data = field:uid additionalParams.wrap = &tx_news_pi1[action]=detail&tx_news_pi1[news]=| } }To configure the handlers in PHP instead (for example, depending on the site), use the PSR-14 event
\TYPO3\CMS\Backend\Controller\Event\ModifyLinkHandlersEvent(since v12).The regression mentioned above (#101344) has been fixed. I am closing this issue. Site-dependent link handler configuration for records on pid 0 would be a separate feature request.
Tobias Pinnekamp wrote:
> Currently you can create custom link handlers and register them through PageTS and they are available throughout the whole page tree.
>
> But there seems no possibility to do the same for modules which do not depend on the page tree and therefore on PageTS, like EXT:redirects. Or I’m not able to find the documentation for that.
>
> It would be great if the link selector popup inside the EXT:redirects backend module is also extendable with custom link handlers so one has the possibility to create redirects to detail pages for records for example.
Make sure you use TYPO3\CMS\Backend\LinkHandler as handler.
There is alsoe a regression. This used to work in TYPO3v11. See #101344 :)