Closed (outdated)
Project:
Drupal core
Version:
10.1.x-dev
Component:
contextual.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2016 at 21:09 UTC
Updated:
15 May 2023 at 23:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lauriiiFabianx proposed to "add an alter hook so that contextual links could instead of changing the variables in preprocess change the render array to add #post_render in the exact same way.
That would allow it continue to work for all cases, where a render array implements #theme.
We had discussed adding alter hooks before to be able to extend #pre_render and #post_render, but no real true use case for that.
This would be one and likely the reason preprocess was chosen for contextual links was due to no generic render array changing alter hook being available. It would likely run directly before the theme handler is called."
Comment #3
lauriiiComment #4
lauriiiComment #6
lauriiiThis is not #post_render but uses instead #theme_wrappers to wrap entities. This is just a proof of concept and only works for entities but I wanted to post this to get some feedback on the approach. I believe this approach should make the contextual links more robust compared to what we have currently.
Comment #17
larowlanAdding an extra wrapper will surely break things like flex layouts
And I don't think we can do that in a BC fashion.
Do we still want to pursue this?
Comment #20
smustgrave commentedIf still a valid feature request will have to consider the BC as @larowlan mentioned. Closing for now as it's been a year. But feel free to reopen
Thanks!