Project

General

Profile

Actions

Feature #98074

open

Add class dropdown to regular linkbrowser

Added by Philipp Kitzberger over 2 years ago. Updated 5 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2022-08-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
linkbrowser
Complexity:
Sprint Focus:

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:

See these two files:

For our BE users it's not comprehensible why there's a difference at all.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #92752: linkhandler don't show up all classes in linkbrowserClosed2020-11-02

Actions
Related to TYPO3 Core - Bug #104157: Link Browser of TCA link fields and RTE links differs in link optionsClosed2024-06-20

Actions
Actions #1

Updated by Philipp Kitzberger over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Riccardo De Contardi over 2 years ago

  • Related to Bug #92752: linkhandler don't show up all classes in linkbrowser added
Actions #3

Updated by Georg Ringer over 2 years ago

  • Status changed from New to Needs Feedback

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?

Actions #4

Updated by Philipp Kitzberger over 2 years ago

Just to be clear: the RTE linkbrowser works fine ok. I'm talking about the non-RTE-linkbrowser.

IMO a field like tt_content.header_link is 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.

Actions #5

Updated by Christian Hackl 8 months ago

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?

@Georg Ringer
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.

Actions #6

Updated by Garvin Hicking 5 months ago

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 via typo3/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.php

That 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

Actions #7

Updated by Garvin Hicking 5 months ago

  • Related to Bug #104157: Link Browser of TCA link fields and RTE links differs in link options added
Actions

Also available in: Atom PDF