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.
I am using the Media module to manage images.
How do I set up references to my Media images from my Galleria content type so they'll display using Galleria?
If I use fieldtype "Multimedia asset" then Galleria does not show as a display option for that field
Comment | File | Size | Author |
---|---|---|---|
#9 | galleria-media-support-1171444-9.patch | 6.06 KB | larowlan |
#8 | AddMediaModuleFieldSupport-1171444-4806206.patch | 7.13 KB | larowlan |
#6 | AddMediaModuleFieldSupport-1171444-4806206.patch | 3.8 KB | CB |
Comments
Comment #1
miro_dietikerNot supported yet.
Please provide a patch. I'd happily support this case.
Comment #2
miro_dietikerBetter title
Comment #3
TommyK CreditAttribution: TommyK commentedsubscribing
Comment #4
miro_dietikerA first approach has been added by
#1185248: Better options page and per-page options
Comment #6
CBA *very* basic patch for using a pre determined media field for alt/title (in Galleria only, not html attribs.)
Just select the titleField and altField options in the admin form and type in the field name you'd like to use. I had no time to make it nicer.
Patch is based off current beta2 version.
Comment #7
kroimon CreditAttribution: kroimon commentedThanks for that patch!
I just now realized there's no standard way to set title/alt attributes using the media module (or is there?). We definitely have to provide a way to set these values as most themes are able to display them.
Comment #8
larowlanThe attached adds stricter checking for presence of $item['file'] - removing a few php warnings.
Comment #9
larowlanThis patch adds support for media 7.x-2.x where the mediafield has been replaced with the file field type.
Also allows the field formatter settings to choose which fields from the entity type are to be used for alt/title tags.
Requires file_entity module which is a dependency of media 7.x-2.x
Please ignore previous patches, this is the way forward as media 7.x-1.x is no longer under active development.
Comment #10
miro_dietikerWill we need a 2.x branch for this?
I think as soon as we commit this, things will break with the media 7.x-1.x module... and its release status is still "unstable" so that's no real solution we can focus on for current installations. (there's already 2800 D7 installs...)
Comment #11
kroimon CreditAttribution: kroimon commentedAs far as I can see, this patch keeps backwards compatibility and just adds support to format file fields containing images.
Thanks for you work, larowlan! I will commit your patch as soon as I find some time to test it thoroughly!
Comment #12
bryancasler CreditAttribution: bryancasler commentedThis is fantastic! Just what I was looking for. Can't wait to try it.
Comment #13
kroimon CreditAttribution: kroimon commentedCommitted and pushed the patch with minor changes. Thanks for your work, larowlan!
Comment #15
reubenavery CreditAttribution: reubenavery commentedIt should be noted that this only works when the field type is "file". These options do not appear when the field type is "image", even with the widget being a Media File Selector.
Comment #16
kirilius CreditAttribution: kirilius commentedIs there a reason why this fix should work only for File type of fields? Why not Images? Wasn't the whole purpose of the fix to have an alternative to the missing alt and title Image attibutes?
I guess the real question is: what do I need to do to make Galleria display my image captions (my image captions are in custom media fields).
Thanks