Closed (outdated)
Project:
PhotoSwipe - Responsive JavaScript Modal Image Gallery
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2011 at 15:08 UTC
Updated:
30 Apr 2016 at 13:13 UTC
Jump to comment: Most recent
Comments
Comment #1
julou commentedWhat do you mean by "using this module with a View"? Is it displaying several nodes on a single page?
Normally, you can control which element is passed as title with the config options:
by default it is using the title data, but you can change it to use the alt data:
Does this do the job?
Comment #2
designguru commentedGood stuff - I think this is what I was looking for... I decided to just enable image titles instead of trying to make alt tags serve a dual purpose (of both alt/seo + an image title).
I can see image titles at the top of the photoswipe interface.
q./
Comment #3
designguru commentedjulou - I tried editing the above to replace "alt" with "description" in the photoswipe.module file - I'd ideally like to print the title and the description of each image, if they've been entered. Adding the word 'description' didn't do anything though.
How can I add the image description to photoswipes?
Thanks,
q./
Comment #4
julou commentedOn the config page (admin/settings/photoswipe), there is a text field "Custom configuration"…
You are not supposed to change the module file, just the text in this field (modifying or adding the getImageCaption property).
If you don't have such a text field, please update your module.
Comment #5
designguru commentedThanks - I see the custom config area...
julou, even then - how can I get both the title and description to display?
q./
Comment #6
julou commentedA simple solution would be something like
But apparently, el.getAttribute("alt") does not work! I have to look at it further to understand whether photoswipe grab the attributes for the a tag or from the img tag… If you can fix it, a patch is more than welcome.
Comment #7
julou commentedComment #8
ParisLiakos commented