I would like to take advantage of the Galleria support for data layers added in version 1.2.5.

Some implementation thoughts:

  1. Use the file_entity module to augment images, etc., with a layer field, e.g. a text area field. The user creates a field for this purpose or uses an existing one.
  2. Create a new galleria field formatter setting that optionally identifies the "layer" field.
  3. Change the galleria formatter view implementation to use the layer field. The layer field's rendered value is inserted into each image as an "attributes" element such that the rendered <img> tag has the 'data-layer' attribute needed by the Galleria library.

I've successfully prototyped this approach and am happy to share it if there's interest. If there is a better way, I might try to implement that too.



pjbarry21’s picture

I'd also love to see this feature added. I saw that it was added in Views jQFX Galleria before that was deprecated, but I'm having trouble getting that module to do what I want to do and Views Galleria is working well, other than not having this feature. Any chance it can be integrated into the module?

mfgering’s picture

If you want to play, here's a patch that adds a "data layer" setting to the formatting options. To use it, you need to install the file_entity module. Then you can optionally add fields to image and file entities. Then you will see a new option in the field format settings for selecting the data layer: settings

A text field with full html for the data layer works well.

Let me know if you problems, questions, suggestions.

pjbarry21’s picture

Thanks for the patch/suggestion.

I did get it installed, but it isn't quite working. I get errors in the view at times (about the height/width css issue -- we've had that in the past), sometimes not all images appear, and when it does work, I've only got 2 data layer fields to choose from -- alt or title text (neither of which appears in the slideshow after selecting them). We were hoping to put the body text as the additional data layer (that's where our full captions are -- title and alt already have some limited info, but not the full caption). I tried creating an option set to see if that had any effect and there was no change. I changed the view from just a slideshow to galleria and that had no (positive) effect. Not sure if this is just not possible or something with our installation (we do have LOTS of modules installed).

If you have a moment for suggestions or things I could check, that would be welcome. Thanks.

jamesbenison’s picture

Status:Active» Closed (duplicate)
jamesbenison’s picture

Issue summary:View changes

escaped img tag in description