How to add SVG icons from theme library to custom liquid code

How to add SVG icons from theme library to custom liquid code

hellekim
Tourist
7 0 1

I'm using Empire Theme, and I'd like to add icons from themes snippets/icon-library.liquid to custom liquid code I use on the product page.

 

With Priority support, I can't get the answer from them, but it shouldn't be too complicated.

 

Attached is a screenshot from the library.

 

liquid.png

Replies 4 (4)

suyash1
Shopify Partner
11080 1365 1746

@hellekim - you can use line below and this svg icon file will get called

{% render 'icon-library' %}

 

To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com
hellekim
Tourist
7 0 1

Cool - and how do I call an individual icon?

suyash1
Shopify Partner
11080 1365 1746
For that you will need to add svg code of the individual icon in the
required place
To build shopify pages use PAGEFLY | Contact me - suyash.patankar@gmail.com
hellekim
Tourist
7 0 1

Ok. I thought I could use something like this:

<i class="icon icon-account"></i>

 

Copy pasting the full code works as well, but it doesn’t seem like a clean solution to me.