Template: Image: Popup

  • 1
  • Question
  • Updated 4 years ago
I have a simple template field that displays an image.
There is an HTML link on the template that opens the image in a new tab.
My users would prefer to open this image in a popup box.
Is this possible?

Here is how I have it setup currently:
<a href="https://c.na10.content.force.com/servlet/servlet.FileDownload?file={{{xxxx}}}; target="_blank"><img src="https://c.na10.content.force.com/servlet/servlet.FileDownload?file={{{xxxx}}};></img></a>
Photo of Scott

Scott

  • 2,722 Points 2k badge 2x thumb

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Sure. If not a row action, then a custom field renderer.

Easier though would be to use this. Not entirely sure this will work.

<a href="javascript:window.open('https://c.na10.content.force.com/servlet/servlet.FileDownload?file={{{xxxx}}}','Image Title','width=500,height=150')"></a>
Photo of Scott

Scott

  • 2,722 Points 2k badge 2x thumb
Thanks Pat!
It works well.
Where can I get some info on Custom Field Renderers?