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'm using D7 and the Media module. My view has the image correctly displayed in the Galleria box, but none of the extra Media fields I put on the view are appearing: Title, Description, Tags, etc. I would like all those to display alongside each image as well as in the lightbox.
It appears fine with views cycle, but it looks like galleria only grabs the image.
Thanks!
Comments
Comment #1
martichka5 CreditAttribution: martichka5 commented+1
The same issue.
I want to rotate two other fields in the slideshow but the module rotates only the images.
Comment #2
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedThough this issue is still valid, I managed a work-around by using the built-in Cycle plug-in for the slideshow (which does support fields) and then used the Views Slideshow jCarousel module for the pager. It's not exactly the same, but it worked for my use case.
Comment #3
sgabe CreditAttribution: sgabe commentedThere is a new settings called "Strip images", by disabling it the module will leave untuched the markup of additional fields, then you can add rich HTML captions using the dataConfig option.
Comment #4
bjalford CreditAttribution: bjalford commentedCould you provide an example on how to do this?
Comment #5
fmdpamaral CreditAttribution: fmdpamaral commentedI´m trying to insert the alt text in my galleria images but with no success. I would appreciate any help in solving this problem.
Thanks.
Comment #6
sgabe CreditAttribution: sgabe commented@fmdpamaral: The display of ALT text should work out-of-the-box by disabling the Strip images option in the Galleria settings of the view. After that, if the image has an ALT text, you will see a clickable info icon in the Galleria.
Comment #7
mausolos CreditAttribution: mausolos commentedOkay, here's the specific problem I'm struggling with.
First of all, I want Alt and Title to be appropriately filled out based on what screen readers and/or search engine crawlers want to see, not just a stop-gap solution where really, something else is needed.
With that said, I'm using Commerce. My products don't necessarily have links to the correct place stored within them, I generally have to create them by piecing together other fields. I want to be able to put a title with a customized link to the product that title describes anywhere in the page I think it should go.
However, I can only seem to get the template inside the module to do anything. Also, it's not clear how/where I should put custom data in order to formulate a link or custom text that might be different from the Title or Alt fields. I'm going to try, for now, the approach outlined halfway through here:
http://www.trellon.com/content/blog/making-galleria-feature
but I don't see it as a viable long-term solution. For one thing, I'll have to be on my game to remember to not let Drupal update override the template when I inevitably update to a new version of this module down the road. For another, I want full control over what users see as they flip through the gallery, not just a couple hacks.
Is there not a way to do this already? What about the dataConfig solution mentioned before, I've heard that actually doesn't work? Does anyone have an example of how to make that work? Where do you access it, the extend section under Advanced Options? How do you pull stuff out of views fields and get it into dataConfig?
Thanks!
Comment #8
fmdpamaral CreditAttribution: fmdpamaral commentedsgabe,
Thanks for your reply.
I do get the info icon with the Alt Text but what I don't get is in the html img tag the alt attribute.
I just get «img style="xxx" src="xxx" width="xxx" height=""», is it possible to get also the alt="xxx"?
Thanks
Comment #9
sgabe CreditAttribution: sgabe commented@fmdpamaral: Though Galleria refactors the HTML code with its own stuff, but the original code contains the ALT attribute of course. However I don't know if it is possible to change the Galleria output in that way, you should try Galleria support.
Comment #10
fmdpamaral CreditAttribution: fmdpamaral commented@sgabe: Thanks for your help. I'll investigate and see if I can find a solution.
If anyone has a solution for alt text please post.
Comment #11
wxman CreditAttribution: wxman commentedI to am trying to get a caption to show on a galleria slides at http://www.robinschone.com/news. I'm wondering if anyone tried what was suggested in #3? I checked the link but I'm not sure where to apply that type of coding.
Comment #12
neardark CreditAttribution: neardark commentedYou can add the below JavaScript function to the dataconfig textarea field, assuming your images have alt and title data (you'll need to enable those for your Image Field if you haven't done so and assign appropriate titles and alt data to your images). You might need to sanitize incoming data if you have untrusted users filling out alt/title tags on your site...
If you want to include other data elements, such as additional fields that are part of the view, you'll need to disable the Strip Images checkbox under Advanced Settings. You can then add additional data to the function above by using jQuery to traverse and include it.
Hope this helps...
Hope this helps someone out there...
Comment #13
quickly CreditAttribution: quickly commented@neardark can you please give a short example code of how to include a views field... suppose i have the node path field... how can I display it by thus function...
Comment #14
wlftn CreditAttribution: wlftn commentedYes, a node path or a link to the node would be excellent. How would this be added to the javascript above?
Comment #15
aubjr_drupal CreditAttribution: aubjr_drupal commentedTo get around this with Views Slideshow: Galleria, when I was pulling in multiple images from one fields from one node, I ended up doing the following (with the help of dpm()):
Since only $rows is used (and perhaps $empty?), I deleted the rest of the tpl php code and added an if isset() to make sure they were full before displaying them.
This is hardly ideal and won't work for pulling in info for EACH image, but it at least does get you static info for the entire slideshow. (Maybe that entity info would work for all of them, but I didn't need to do that.)
Comment #16
knalstaaf CreditAttribution: knalstaaf commentedWhat is the "Dataconfig textarea field" and where can we find it (#12)?
Edit: aha, found it. It's in the Advanced Settings of the Galleria format.
I think it's been pushed to the dev version, since the little black box with the "i" appears now. I guess that's what this issue is all about.
My goal however, is to get the alt-attribute into the
img
-tag, likt this:<img src="images/path" ALT="This is an image">
(Should I create a new issue for this, or is the solution within the vicinity of this issue?)
Comment #17
Jens Peter CreditAttribution: Jens Peter commentedI have the same issue and not found a solution for this.
Anyone with ideas?
I have looked for that "Strip images" option but with no luck either. I have no idea where that is and I think I have been into each and every option in the view settings and still I have not found it. Am I blind or maybe someone would be so kind to guide me to the place where I can change this setting.
Comment #18
brandonratz CreditAttribution: brandonratz commentedViews Rewrite Option
Problem:
When using the Media module, Alt and Title attributes are not added by default to an img tag (that I've seen).
Quick Solution (no php code or templating):
1. Install/Enable Image URL Formatter - This provides easy access to the image URL/URI
2. Create a view with a field using your image field or multimedia asset field.
3. Configure your view field Formatter to be set to Image URL: Relative file path
4. Dropdown Rewrite Results check Rewrite the output of this field
5. Add to Text area:
<img src="/[field_image]" title="[field_image-title]" alt="[field_image-alt]" />
5a. Check replacement patterns for additional tokens
This method is versatile because you can use any Replacement Patters (tokens) from other fields in your attributes. Consider creating a caption title and caption description field for example.
Comment #19
joelhsmith CreditAttribution: joelhsmith commentedI wrote this up real quick to try to fix the issue and made a pull request.
https://github.com/worseisbetter/galleria/pull/401
I am using Galleria with Scald in my scenario, but the Galleria library is the same. Hope it gets pulled in! :-)
edit: whoops wrong link.