Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
(First, verify that the preprocess changes have been made. #2322163: [meta] Consensus Banana Phase 1, move CSS classes from preprocess to twig templates.)
- Copy the Twig templates from the core module's templates directory to Classy's templates directory. Include all templates, even ones without classes.
- Remove all classes from the core module's template. Remove all classes added with addClass and ones that are hard-coded in the template.
- If there are classes that are required for basic functionality, discuss whether they should be kept.
- If there is CSS from the module, or anywhere else, referring to the class, discuss removing it or moving it to Bartik&Seven. Do not move the CSS to Classy.
Twig Templates to Copy
core/modules/link/templates/link-formatter-link-separate.html.twig
Comment | File | Size | Author |
---|---|---|---|
#16 | stark-patch-applied.png | 17.38 KB | emma.maria |
#16 | stark-before-patch.png | 16.96 KB | emma.maria |
#13 | copy_link_templates-2349715-13.patch | 949 bytes | saki007ster |
#8 | copy_link_templates_to-2349715-8.patch | 4.65 KB | Manuel Garcia |
#1 | copy_link_templates_to-2349715-1.patch | 1.54 KB | lauriii |
Comments
Comment #1
lauriiiComment #2
lauriiiComment #4
derheap CreditAttribution: derheap commentedThe preprocess conversion is not done: #2329763: Move links classes from preprocess to templates is not in core yet.
Comment #5
lauriiiComment #6
lauriiiUps didnt mean to assign
Comment #7
Manuel Garcia CreditAttribution: Manuel Garcia commentedHaving a go at this...
Comment #8
Manuel Garcia CreditAttribution: Manuel Garcia commentedHere is #1 plus the fixed tests in
Drupal\link\Tests\LinkFieldTest
.Ran a recursive search on core for all three classes, they are just on the twig file so nothing else to do here I think.
Comment #12
saki007sterComment #13
saki007sterCopied templates from link module to the classy theme and removed classes from the module template files.
Comment #14
saki007sterComment #15
saki007sterComment #16
emma.mariaBefore:
After:
Setting this issue to RTBC.
Comment #17
alexpottTemplate change is not blocked by beta. Committed 9d21438 and pushed to 8.0.x. Thanks!