Actions
Feature #92844
openCustom handling of links to additional doktypes
Status:
New
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2020-11-16
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
medium
Sprint Focus:
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.
Actions