#92844Custom handling of links to additional doktypes
Description
It would be useful to be able to handle links are for custom doktypes in a custom way. I suggest extending this condition (see link below) through a PSR-14 event that allows custom link generation if necessary.
if ((int)$page['doktype'] === PageRepository::DOKTYPE_LINK) {
$conf['parameter'] = $page['url'];
unset($conf['parameter.']);
$this->contentObjectRenderer->typoLink($linkText, $conf);
$target = $this->contentObjectRenderer->lastTypoLinkTarget;
$url = $this->contentObjectRenderer->lastTypoLinkUrl;
if (empty($url)) {
throw new UnableToLinkException('Link to external page "' . $page['uid'] . '" does not have a proper target URL, so "' . $linkText . '" was not linked.', 1551621999, null, $linkText);
}
}
I would be happy to implement this feature.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 2
-
Mathias Brodala changed description <span data-processor="relativetime" data-value="2020-11-16T08:58:42+00:00" > 11/16/20, 08:58 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-03T04:45:52+00:00" > 10/03/26, 04:45 </span>
closing this issue as code changed a lot:
ModifyPageLinkConfigurationEventandAfterLinkIsGeneratedEventcan be used to modify the link