smarty icon indicating copy to clipboard operation
smarty copied to clipboard

include SVG file

Open AlexJMcloud opened this issue 3 years ago • 4 comments

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!!!

AlexJMcloud avatar Dec 21 '22 09:12 AlexJMcloud

Why do you not want to enclose it in an <img> tag? That's the proper way to do things.

scottchiefbaker avatar Dec 21 '22 16:12 scottchiefbaker

If I do that, I can't manipulate the styles of the svg elements.

AlexJMcloud avatar Dec 22 '22 08:12 AlexJMcloud

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>

lxsdevcode avatar Dec 25 '22 12:12 lxsdevcode

This is not an issue, but a how-to. If you need further help, please start a Discussion.

wisskid avatar Jan 10 '23 20:01 wisskid