Project

General

Profile

Actions

Feature #92844

open

Custom handling of links to additional doktypes

Added by Mathias Bolt Lesniak about 4 years ago. Updated about 4 years ago.

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.

https://github.com/TYPO3-CMS/frontend/blob/48363a9e3a77f516d2e60a3021d4293899d69146/Classes/Typolink/PageLinkBuilder.php#L221

            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 #1

Updated by Mathias Brodala about 4 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF