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.
Hi, i tried to use the target attribut as a token in views and it is empty.
Best regards
Lars
Comment | File | Size | Author |
---|---|---|---|
#14 | link-n1985050-14.patch | 871 bytes | DamienMcKenna |
| |||
#9 | link-1985050-add-attribute-tokens-3_0.patch | 846 bytes | j0sbeir |
#3 | link-1985050-add-attribute-tokens.patch | 992 bytes | nightlife2008 |
Comments
Comment #1
KarlSheaI am also not able to get at the target attribute through Token. I'm using latest Entity Token dev, latest Link, latest Token and the attributes token returns a struct wrapper, but when trying to nest any further the struct wrapper is null in the function to get the value for target.
Comment #2
aryser CreditAttribution: aryser commentedComment #3
nightlife2008 CreditAttribution: nightlife2008 commentedIn attachment is the patch I created to support the attribute tokens.
Comment #4
B-Prod CreditAttribution: B-Prod commentedComment #6
j0sbeir CreditAttribution: j0sbeir commentedThe patch attached works with 7.x-1.4
Comment #7
j0sbeir CreditAttribution: j0sbeir commentedFixed patch path so it can be used properly with drush make
Comment #8
j0sbeir CreditAttribution: j0sbeir commentedComment #9
j0sbeir CreditAttribution: j0sbeir commentedOkay.. something went wrong with my upload :-)
Third time's the charm!
Comment #10
nightlife2008 CreditAttribution: nightlife2008 commentedI just noticed my faulty patching :(
Comment #11
anneeasterling CreditAttribution: anneeasterling as a volunteer commentedThis patch enabled me to use a token formatted like this to access the target attribute:
[entity_name:field_custom_link:attributes:target]
In other words, I've tested and works. It would be awesome if this were officially tested and committed.
Thanks!
Comment #12
scott_earnest CreditAttribution: scott_earnest commentedPerhaps: https://www.drupal.org/project/link/issues/1508614#comment-13382074
Comment #13
DamienMcKennaComment #14
DamienMcKennaRerolled.
Comment #15
DamienMcKennaThe existing test coverage needs expanding.