Drill using a favicon

  • 1 June 2015
  • 1 reply

Userlevel 4


Similar to drilling with a sparkline, we may also use favicons as the linked path. In this particular example, I’ll be using the Salesforce and Gmail favicons to create a Look that displays customer names along side links to their Salesforce account and email. The possibilities here are endless (as long as the supply for public favicons is endless).

###How do we do it?

The favicons are sourced from Salesforce and some blog on the interwebs. Self-hosted Looker customers can add custom images and use the same syntax to add images to a dimension/measure. We then use the html: parameter to force a link through the favicon.

Make sure to note that the link is stored in the a href="..." and the favicons are simply used as the linked values. The purpose of {{ }} is to allow the html to grab the value of in the given row, while allowing the dimension to output the

  - dimension: salesforce
sql: ${TABLE}.Id
html: |
<a href="{{ value }}" target="_blank">
<img src="" height=16></a>

- dimension: name
sql: ${TABLE}.Name
html: |
<a href="mailto:{{ }}" target="_blank">
<img src="" height=16></a>
{{ rendered_value }}

###What does it look like?

Imagine the blurred parts are our customers’ names. The gmail icon will link out to mailto: and the salesforce icon links directly to the account related to that contact.

1 reply

Userlevel 1

This is now even easier with drill menus! Set a mailto link using drill field URLs