Problem/Motivation
It's difficult to extend the form-element-label.html.twig template in small ways, because every implementation of the template duplicates everything, rather than extending. But it is particularly difficult because the majority of the logic still happens in a preprocess function.
Proposed resolution
Remove template_preprocess_form_element_label(), move its logic into the Twig template.
But keep BC for the Stable & Classy themes, so duplicate that preprocess function to stable.theme.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | Screenshot 2022-06-10 at 12.51.24 PM.png | 288.95 KB | Madhu Kumar M E |
| #24 | interdiff_20_24.txt | 632 bytes | rassoni |
| #24 | 2699635-24.patch | 8.58 KB | rassoni |
| #20 | interdiff-2699635-18_20.txt | 1.37 KB | gauravvvv |
| #20 | 2699635-20.patch | 8.58 KB | gauravvvv |
Comments
Comment #2
wim leersComment #3
dawehnerCould we add all those variables to
hook_theme()for now, so we don't up in using#in templates? I doubt we want to do that on the longrun.Comment #4
wim leersYeah I agree it's ugly/painful/questionable.
I'd especially like front-end folks' thoughts on that though.
Comment #16
catchComment #17
ranjith_kumar_k_u commentedRe-rolled #2 for 9.4
Comment #18
ranjith_kumar_k_u commentedComment #19
andypoststill needs to fix CS and there's no more spaceless tag and not clear why "screenreader is unknown
Comment #20
gauravvvv commentedRe-rolled patch #18, Attached interdiff for same.
Screenreader is now changed to screenreaders.
Comment #21
gauravvvv commentedComment #24
rassoni commentedReroll the patch.
Comment #25
Madhu Kumar M E commentedI applied patch #24 , It's not applied successfully added screenshot for reference.