Project

General

Profile

Feature #92844

Updated by Mathias Brodala over 3 years ago

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 https://github.com/TYPO3-CMS/frontend/blob/10.4/Classes/Typolink/PageLinkBuilder.php#L221 

 <pre><code class="php"> 
             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); 
                 } 
             } 
 </code></pre> 


 I would be happy to implement this feature.

Back