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.

Comments

TrailWiki created an issue. See original summary.

amairesse’s picture

I 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

igalafate’s picture

StatusFileSize
new1.52 KB

I 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.

igalafate’s picture

StatusFileSize
new1.45 KB

Sorry, I the last one does not apply using composer. Here is the good one.

micropat’s picture

Thanks 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. :)

  • micropat committed 892b989 on 8.x-1.x
    Issue #2881246 by isaura: Display on Media Bundles
    
    Make the addtoany...
micropat’s picture

Title: Does not display on Media Bundles » Display on Media Bundles
Status: Active » Fixed

The 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.