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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miro_dietiker’s picture

Category: support » feature

Not supported yet.

Please provide a patch. I'd happily support this case.

miro_dietiker’s picture

Title: How to add Media to a Galleria content type?? » Add media module / field support

Better title

TommyK’s picture

subscribing

miro_dietiker’s picture

Status: Active » Fixed

A first approach has been added by
#1185248: Better options page and per-page options

Status: Fixed » Closed (fixed)

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

CB’s picture

A *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.

kroimon’s picture

Status: Closed (fixed) » Needs review

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

larowlan’s picture

The attached adds stricter checking for presence of $item['file'] - removing a few php warnings.

larowlan’s picture

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

miro_dietiker’s picture

Will 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...)

kroimon’s picture

As 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!

bryancasler’s picture

This is fantastic! Just what I was looking for. Can't wait to try it.

kroimon’s picture

Status: Needs review » Fixed

Committed and pushed the patch with minor changes. Thanks for your work, larowlan!

Status: Fixed » Closed (fixed)

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

reubenavery’s picture

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

kirilius’s picture

Is 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