Still attempting to solve this issue of attaching a hyperlink to an image in the gallery. Am I overthinking this?
Going a step farther, if I use
[[~[[+image-link-path]]]]
instead of
then whoever is inserting images and links into the form should only have to type the number of the resource id.
Still stuck though. What if the user does not put in a resource number. With my current tpl some of the html markup will still appear. Doesn't seem proper to have all the href code and closing a tag if there is no actual path inserted.
Do I need two tpls for the li? One for an image with a hyperlink and one for without. How would I get MIGx to pick between the two. Some kind of a conditional bit of code?
I have scoured the internet and forum looking for examples. Amazingly, I find plenty of info and tutorials on getting an image on a page with MIGx and getImageList, but none that show of discuss putting a hyperlink on each image.