verbb / snipcart

A Craft CMS plugin to integrate with Snipcart.
Other
21 stars 9 forks source link

Allow HTML to be outputted in place of simple text string #35

Closed jsmrtn closed 3 years ago

jsmrtn commented 3 years ago

There are times when you do not want to output a simple text string for the cart link, but rather usually an icon, or potentially any other HTML structure you can think of.

{% set tag = '<i class="fal fa-shopping-bag" aria-hidden="true"></i><span class="sr-only">Cart</span>' %}
{{ craft.snipcart.cartLink(tag, true) }}
benface commented 3 years ago

Thank you!