smarty
smarty copied to clipboard
include SVG file
How to implement the use of SVG logo without enclosing it in an img tag.
{include 'file:/assets/image/logo.svg' assign=logo}
no work!!!
Why do you not want to enclose it in an <img> tag? That's the proper way to do things.
If I do that, I can't manipulate the styles of the svg elements.
you can use sprite instead to style svg ...
ex:
<svg viewBox="0 0 100 100" class="css-class">
<use xlink:href="/images/icons.svg#logo"></use>
</svg>
This is not an issue, but a how-to. If you need further help, please start a Discussion.