Jump to content

ips.ui.lightbox.js meta hardcoded to display image url, not provided meta data


Go to solution Solved by Marc Stridgen,

Recommended Posts

Bit of a deep cut this, and probably been there forever, but it would be nice to get this patched, if not in the 4x line, then 5x.

_showImage method, line 305 (or approx) in ips.ui.lightbox.js

			// Build meta info
			if( image.meta ){
				pieces.metaPanel
					.show()
					.html( ips.templates.render('core.lightbox.meta', { title: image.largeImage } ) );
			} else {
				pieces.metaPanel.hide();
			}

Any alphanumeric/variable we pass in a front-end template through the data-ipsLightbox-meta bit, (e.g. data-ipsLightbox-meta="DERP"), will never display as you have the title variable in the render call hardcoded to image.largeImage instead of image.meta.

image.largeImage is just the url to the image; once patched we can throw titles, descriptions, whatever at this. Loads better than staring at a full url. Easy fix to boot.

Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...