Clickable "Attach" Icon in table

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I'm using a template field in a table to provide a link to the "attach file" wizard.  Instead of displaying clickable text in my table, I'd like to display the paperclip "attach" icon.  

My link works well if I use text (between _parent"> and </a> tags), but if I put in the div class to insert the icon, the icon displays but is not clickable.

Here's my template field:

{{#Attachments_Allowed__c}}
<a href="/p/attach/NoteAttach?pid={{{Id}}}&parentname={{{Name}}}&retURL={{{Id}}}" target="_parent"><div class="sk-icon sk-icon-attachments"</div>style="display:inline-block"></a>
{{/Attachments_Allowed__c}}
Photo of Elissa Bradley

Elissa Bradley

  • 1,672 Points 1k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Try this:



<a href="http://www.google.com" target="_parent" ><div class="sk-icon sk-icon-attachments" style="display:inline-block"></div></a>

(Edited)
Photo of Elissa Bradley

Elissa Bradley

  • 1,672 Points 1k badge 2x thumb
That works perfectly!  Thanks for the quick reply.  

In case anyone wants to do something similar, here's the final link:

<a href="/p/attach/NoteAttach?pid={{{Id}}}&parentname={{{Name}}}&retURL={{{Case__c}}}" target="_parent"><div class="sk-icon sk-icon-attachments" style="display:inline-block"></div></a>