Review main Merged

90058[FEATURE] Add options to predefine link target and class in LinkBrowser

Michael Staatz CR +2 V +2 Normal +90 −0 updated 11/01/25, 09:43

Commit message

Allow editors to configure default link target and class attributes
in the LinkBrowser configuration. Global defaults can be set for all
link types and overridden per handler type. This improves workflow
efficiency by reducing repetitive attribute selection.

Review

  • Code review CR +2 Done
    • Garvin Hicking +2
    • Oli Bartsch +1
    • Jörg Bösche +1
  • Verified V +2 Done
    • Garvin Hicking +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1519

  1. Michael Staatz uploaded patch set 1 07/13/25, 03:38

  2. core-ci voted on patch set 1 V +1 07/13/25, 03:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81647

  3. Garvin Hicking commented on patch set 1 07/13/25, 09:55

    Nice, thank you, this seems to work well for me. How do you feel about also allowing to pre-configure the "CSS" field? "Title" would always be individual (and was removed in the RTE config due to this) so I think that would be the only one missing?

    AbstractLinkBrowserController.php:227

    Should a global key like "RTE.buttons.link.properties.target.default" does for the RTE also made available, so that one would not need to individually set each key?

    Feature-107081-AddAnOptionToPredefineLinkTargetInLinkBrowser.rst:19

    ```suggestion Configuration can be set via Page TSconfig: ```

    Feature-107081-AddAnOptionToPredefineLinkTargetInLinkBrowser.rst:38

    How about adding a paragraph like: ``` .. hint:: Note that default `target` attributes of links added via the RTE are configured individually via Page TSConfig options like: .. code-block:: typoscript RTE.buttons.link.properties.target.default = _blank RTE.buttons.link.page.properties.target.default = _blank ``` For details, see `buttons.link.[ type ].properties.target.default <https://docs.typo3.org/permalink/t3tsref:buttons-link-type-properties-target-default>`_.
  4. Michael Staatz commented on patch set 1 07/13/25, 12:42

    Reply

    Nice Idea. I will get in to this and also the global key.
  5. Michael Staatz updated the commit message in patch set 2 V +1 07/13/25, 14:52

  6. Michael Staatz uploaded patch set 3 07/13/25, 14:55

  7. core-ci voted on patch set 2 V +1 07/13/25, 15:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81658

  8. core-ci voted on patch set 3 V +1 07/13/25, 15:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81659

  9. Garvin Hicking commented on patch set 3 07/14/25, 18:20

    AbstractLinkBrowserController.php:227 Reply

    Done

    AbstractLinkBrowserController.php:260

    Fingers crossed nobody named their linkhandler "properties". I think "claiming" it for consistency is still fair at this point and aligns with the "RTE.buttons.link.properties" naming scheme.

    Feature-107081-AddAnOptionToPredefineLinkTargetInLinkBrowser.rst:19 Reply

    Done

    Feature-107081-AddAnOptionToPredefineLinkTargetInLinkBrowser.rst:38 Reply

    Done

    Feature-107081-AddOptionsToPredefineLinkTargetAndClassInLinkBrowser.rst:21

    ```suggestion TCEMAIN.linkHandler.[handlerKey].(target|cssClass).default = _blank ```
  10. Michael Staatz commented on patch set 3 07/14/25, 18:47

    Feature-107081-AddOptionsToPredefineLinkTargetAndClassInLinkBrowser.rst:21 Reply

    Fix applied.
  11. Michael Staatz commented on patch set 3 07/14/25, 18:53

    AbstractLinkBrowserController.php:260 Reply

    Did it mean it should be changed? Or does it need an other default key? May be it could be "TCEMAIN.linkhandlers.properties.(target|cssClass).default" ?
  12. Michael Staatz commented on patch set 4 V +1 07/14/25, 18:55

    Published edit on patch set 3.
  13. Garvin Hicking commented on patch set 4 CR +1 V +1 07/14/25, 18:58

    AbstractLinkBrowserController.php:260 Reply

    Honestly I think it's OK to use that key, just wanted to take note why I believe it's fair. Your idea to take the plural-s variant for its own key might be a compromise, let's see what other's say. I think it could also lead to confusing key names or typos if that small distinction is made.
  14. core-ci voted on patch set 4 V +1 07/14/25, 19:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81701

  15. Jörg Bösche voted on patch set 4 CR +1 08/18/25, 11:26

  16. Oli Bartsch voted on patch set 4 CR +1 V +1 09/18/25, 21:03

  17. Garvin Hicking voted on patch set 4 CR +2 V +2 09/18/25, 21:06

  18. Garvin Hicking merged patch set 5 09/18/25, 21:07

  19. Lina Wolf commented on patch set 5 11/01/25, 09:43