Feature #104479
openAdd possibility to customize pre-selected target values/options in LinkBrowser
0%
Description
Currently it's only possible to select from the values/options "Top"
[_top]
and "New Window"[_blank]
, which are hard-coded in the following classes/methods:
\TYPO3\CMS\Backend\Controller\AbstractLinkBrowserController::getLinkAttributeFieldDefinitions()
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/backend/Classes/Controller/AbstractLinkBrowserController.php#L450-L451\TYPO3\CMS\RteCKEditor\Controller\BrowseLinksController::getTargetField()
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php#L382-L383
Here are some user stories that'll describe several use-cases:
- As a backend user , I want to select customized pre-selected target values/options in the LinkBrowser.
- As a TYPO3 CMS Integrator , I want to configure the pre-selected target values/options of the LinkBrowser via TsConfig.
- As a TYPO3 CMS Developer , I want to manipulate the pre-selected target values/options of the LinkBrowser via a PSR-14 Event.
Files
Updated by Garvin Hicking 4 months ago
- Status changed from New to Needs Feedback
Could you maybe describe the use case for this? I only remember targets other than the hardcoded ones from the "dark ages of framesets", so I'd be curious where this could be used. :-)
Updated by Garvin Hicking 4 months ago
- Category set to Site Handling, Site Sets & Routing
Updated by Moritz Ngo 4 months ago
A common use-case would be somthing like a lightbox or modal box.
In my particular case, I needed the value "Overlay"[overlay]
and added a patch-file which adds a new hard-coded option :P
Updated by Garvin Hicking 4 months ago
Ah, thank you.
I wonder though, could you just use CSS classes and predefined ones, and then have your javascript that spawns modals/lightboxes react based on class name instead of target-attribute?
This would of course be a workaround. I think if a target list gets changeable it would need to be inplemented to all of: Typoscript configration, yaml configuration, TCA definition (like the other fields), which is a bit of work. ;)