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.
So we can use image style tokens for images on Taxonomy items, users, etc.
Comment | File | Size | Author |
---|---|---|---|
#9 | 1525210-9-support-any-entity-type.patch | 1.58 KB | Hydra |
#2 | imagecache_token-metatag-tokenlist-after-patch.JPG | 83.59 KB | silkogelman |
#2 | imagecache_token-metatag-tokenlist-before-patch.JPG | 73.17 KB | silkogelman |
#1 | 1525210-support-any-entity-type.patch | 1.71 KB | merlinofchaos |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedThis patch fixes it to support any entity type, using token.module's entity mapping. While I haven't rigorously tested this, it does work with an image field on a term entity.
It also has the beneficial side effect of fixing notices caused by blindly setting the image-field type on tokens for fields that aren't actually on the nodes (because they're only on other entity types).
Comment #2
silkogelman CreditAttribution: silkogelman commentedit seems to work well.
Tested by checking if Taxonomy tokens show up in the Metatag Token list (they did, screenshots attached).
I haven't been able to actually make a og:image metatag with a image-token show up, but that could be a Metatag issue (or a 'me' issue)
Thanks for this patch!
Comment #3
seandunaway CreditAttribution: seandunaway commentedWorks great, let's get it in. :)
Comment #4
yannickooWorks fine!
Comment #5
Pls CreditAttribution: Pls commentedWorks great, not sure why there's no official release with this patch. Let's do it! Would love to hear a word from module maintainer. Thanks.
Comment #6
askibinski CreditAttribution: askibinski commentedPatch works great, nice little module!
Comment #7
jwilson3How about entities attached to entities (eg, field_collections)? This patch doesn't work for my specific case of wanting to grab the first image of a slideshow in a taxonomy term via a multiple-item field collection.
eg [term:field-slideshow-slides:1:field_slide_image:my_image_style_preset_name]
I guess this is sufficiently special-case that it should be a separate issue.
Comment #8
Bartezz CreditAttribution: Bartezz commentedWorks like a charm!
Comment #9
Hydra CreditAttribution: Hydra commentedPatch doesn't apply with the "latest" dev version. Rerolled it. Otherwise the Patch does what I would expect the module to do, thanks earl!
@maintainer: Please commit this! It's RTBC now for quit a lot of time.
Comment #10
Hydra CreditAttribution: Hydra commentednevermind, ignore #9, I wasn't on the right branch >.< stupid!
Confirm that #1 is working!
Comment #11
Hydra CreditAttribution: Hydra commentedCommit 2a1a8ae on 7.x-1.x, Thanks!