Open alexljamin opened 5 years ago
You can use use include:
https://github.com/getgrav/grav-theme-quark/blob/develop/templates/partials/logo.html.twig#L7
BTW the @images namespace is defined in that theme class’s here https://github.com/getgrav/grav-theme-quark/blob/develop/templates/partials/logo.html.twig#L7
It s optional but include will not know how to resolve the theme:// stream without it.
Thank you for your quick response @rhukster ! In your second response you have shared the exact same URL as in your first answer. I am not able to find the @images
namespace definition in that link.
Is that what I should be looking at https://github.com/getgrav/grav-theme-quark/blob/develop/quark.php#L24 ?
Duplicating the @images namespace in this class seem to work. Will you be open if I add this information to docs - https://learn.getgrav.org/16/themes/asset-manager#static-assets?
All of these commands return
<img ... />
attribute:{{ media['theme://images/name.svg'] }}
{{ media_directory('theme://images')['name.svg'] }}
{{ page.media['theme://images/name.svg'] }}
{{ media['theme://images/name.svg'].display('source') }}
But I need to get contents of the SVG shown inline in DOM with something like this:
{{ source("theme://images/name.svg") }}
Currently it returns:
I have checked this and that but none of the questions do not really have an answer relevant to my issue.
What will be the correct syntax to return the content of SVG?