You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to embed (or 'get', not sure which is better) as section of inline svg code into my template using Stash. However, the parser assumes it will have the html extension, and cannot read it.
I have currently worked round the by adding svg to the permitted file extensions for Stash embeds in your core code:
but then I get the following error message 'Parse error: syntax error, unexpected T_STRING' in ... libraries/Functions.php(680) : eval()'d code on line 534
So I have two questions:
Is there any way to embed in-line svg without hacking your core?
Is there a way to get the svg code read without triggering a php error?
UPDATE: I've solved the parse error message by running the module updates. So just question one remains. I guess I could just rename the svg file to html, but that feel's a bit uncomfortable.
UPDATE 2: I've now seen you can add svg as a permitted file type via the Stash config variables. So in other works all queries resolved!
Thanks in advance, Nye
The text was updated successfully, but these errors were encountered:
Hey, sorry to resurrect this, but I'm having difficulty working out how you can add .svg as a permitted filetype via Stash config variables. It would be helpful for me (and for other future users!) if you could post the line you added to your config, or a link to a fuller explanation elsewhere :D
Hi Mark,
I'd like to embed (or 'get', not sure which is better) as section of inline svg code into my template using Stash. However, the parser assumes it will have the html extension, and cannot read it.
I have currently worked round the by adding svg to the permitted file extensions for Stash embeds in your core code:
array('html', 'md', 'css', 'js', 'rss', 'xml', 'svg');
but then I get the following error message 'Parse error: syntax error, unexpected T_STRING' in ... libraries/Functions.php(680) : eval()'d code on line 534
So I have two questions:
UPDATE: I've solved the parse error message by running the module updates. So just question one remains. I guess I could just rename the svg file to html, but that feel's a bit uncomfortable.
UPDATE 2: I've now seen you can add svg as a permitted file type via the Stash config variables. So in other works all queries resolved!
Thanks in advance, Nye
The text was updated successfully, but these errors were encountered: