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.
Add an external class on all external links like the old theme does.
Also add a title attribute suffix for accessibility purposes.
Comment | File | Size | Author |
---|---|---|---|
#6 | add_an_class_on-2491205-6.patch | 1.28 KB | Oostie |
#4 | add_an_class_on-2491205-4.patch | 1.28 KB | Oostie |
#1 | add_an_class_on-2491205-1.patch | 1.31 KB | Oostie |
Comments
Comment #1
OostieAttached patch adds the theme_link function as it is in the old rijkshuisstijl theme.
This patch also adds an suffix on the title attributes or a new title when the link is external.
Comment #2
OostieComment #3
BarisW CreditAttribution: BarisW at LimoenGroen commentedThis is not correct. Can this be changed to
t('@title (Opens an external page)')
?Comment #4
OostieThis one should be better.
Comment #5
BarisW CreditAttribution: BarisW at LimoenGroen commentedOne minor thing: please change
isset
to!empty
, so that this also works if a title is set but empty.Otherwise: great addition!
Comment #6
OostieThanks for the quick reaction!
Comment #7
BarisW CreditAttribution: BarisW at LimoenGroen commentedComment #8
BarisW CreditAttribution: BarisW at LimoenGroen commentedTo be committed today
Comment #9
BarisW CreditAttribution: BarisW at LimoenGroen commentedThanks, works great.