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.
This works great for regular nodes. I have Drupal Media installed and have a couple Media Bundles configured. How do I get this to display for a media bundle.
Comment | File | Size | Author |
---|---|---|---|
#4 | addtoany_media_bundle_2881246-4.patch | 1.45 KB | igalafate |
Comments
Comment #2
amairesse CreditAttribution: amairesse commentedI got it working this way - requires Display suite
1/ In Structure > Display Suite > Fields (admin/structure/ds/fields), add a field of type "Block". Give it a name (e.g. AddToAny), check "Media" in entities and select the "AddToAny buttons" block, save
2/ Go to Structure Media bundles (structure/media) and select Manage display in front of your Media Bundle and enable Display suite for this bundle by selecting in "Select a layout" one of the Display suite layouts.
Move the field you just created from the "Disabled" section to the "Content" section and save
Comment #3
igalafate CreditAttribution: igalafate at La Drupalera by Emergya commentedI was looking for this functionality as well. I have attached a patch to be applied on the AddToAny module as a first approach to be used with media entities using the Media Entity module.
Comment #4
igalafate CreditAttribution: igalafate at La Drupalera by Emergya commentedSorry, I the last one does not apply using composer. Here is the good one.
Comment #5
micropat CreditAttribution: micropat commentedThanks for the patch @isaura — it's just a few hours behind! A very recent dev commit (ba8deeb) simplifies the addition of entity types — line 39 of addtoany.module.
You're welcome to provide the one-liner patch. :)
Comment #7
micropat CreditAttribution: micropat commentedThe AddToAny extra/pseudo-field is now available by default for “media” entities in the
dev
branch.This feature is expected to be in the next module release,
8.x-1.9
.