#98074Add class dropdown to regular linkbrowser
Description
While the linkbrowser within CKeditor still offers a dropdown field for the class attribute, the “regular” linkbrowser (for typolink fields like tt_content.header_link) only offers a simple input field:
- https://github.com/TYPO3/typo3/blob/main/typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php#L429
- https://github.com/TYPO3/typo3/blob/main/typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php#L493
For our BE users it’s not comprehensible why there’s a difference at all.
Reviews 1
Related issues 3
History 911
-
Philipp Kitzberger changed description <span data-processor="relativetime" data-value="2022-08-04T09:17:33+00:00" > 08/04/22, 09:17 </span>
-
Riccardo De Contardi changed Related to #92752 <span data-processor="relativetime" data-value="2022-08-04T15:40:47+00:00" > 08/04/22, 15:40 </span>
-
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2022-08-05T08:54:00+00:00" > 08/05/22, 08:54 </span> -
Philipp Kitzberger commented <span data-processor="relativetime" data-value="2022-08-05T13:54:40+00:00" > 08/05/22, 13:54 </span>
Just to be clear: the RTE linkbrowser works
fineok. I’m talking about the non-RTE-linkbrowser.IMO a field like
tt_content.header_linkis providing “typolink” functionality which does include the class attribute as its 3rd (?) parameter. Thus, I think, the linkbrowser should offer a pre-configured list of classes instead of allowing the BE users to just enter whatever they want. -
Christian Hackl commented <span data-processor="relativetime" data-value="2024-03-28T12:55:52+00:00" > 03/28/24, 12:55 </span>
I also think that all link browsers, whether TCA field or RTE, should work / look the same and be configurable…
It would be great if the NOT RTE link browser could get its own config.yaml in which you could configure your own CSS classes (just like the RTE link browser).I wonder why there are 2 different ones anyway… Both actually do the same thing, why are there 2 different implementations here?
@just2b
For example, if you want to style links, then it is nicer for the editor if he can do everything at once – in one window (setting the link and its attributes).
If this is solved via the RTE style field, the editor must first set the link in the link browser and then select the correct class again in the RTE via the style select field. <- I find this a bit cumbersome. -
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-07-01T14:21:33+00:00" > 07/01/24, 14:21 </span>
Some technical background:
The “RTE modal popup” is implemented via
typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php– and the “TCA modal popup” is done viatypo3/sysext/backend/Classes/Controller/LinkBrowserController.php(Note how the naming has some, let’s say, discrepancy).Both PHP classes inherit from
typo3/sysext/backend/Classes/Controller/AbstractLinkBrowserController.phpThat abstract base class doesn’t know much about implementation details for dropdowns. The RTE extension of the abstract class does a lot of (quite hard to read) YAML config loading to offer dropdowns. The TCA extension however is much more readable and “simple”.
A lot of BrowseLinksController could be transplanted to LinkBrowserController, and be adapted to TCA config instead of YAML config. The appropriate TCA keys would all need to be implemented, and the ones in the YAML config are already quite deeply nested and hard to read.
Probably that would need some more unification so that everything is put into the Abstract Class then, but just be fed by differend config providers. This again would make the abstract class then bloated.
So…. who’s willing to take a stab at this? :D
-
Garvin Hicking changed Related to #104157 <span data-processor="relativetime" data-value="2024-07-01T14:21:47+00:00" > 07/01/24, 14:21 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96513 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2026-10-07T21:01:15+00:00" > 10/07/26, 21:01 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96513 <span data-processor="relativetime" data-value="2026-10-07T21:40:25+00:00" > 10/07/26, 21:40 </span>
-
Georg Ringer commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-09T19:30:10+00:00" > 10/09/26, 19:30 </span>Applied in changeset commit:37fc203df6aaa75cb106695e2e8f5d6adb0dc27b.
-
Benni Mack changed Related to #106741 <span data-processor="relativetime" data-value="2026-11-15T15:05:47+00:00" > 11/15/26, 15:05 </span>
thanks for creating the issue!
even though it is misleading I think the reason is that the classes can and should be set via styles dropdown of the RTE which can be configured far better than the one on the modal. therefore I would reject the issue, what do you think?