|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
phpsmarty Smarty n00b
Joined: 04 Mar 2009 Posts: 2
|
Posted: Wed Mar 04, 2009 3:21 pm Post subject: svg image support |
|
|
I am use smarty-2.6.22. It supports embed SVG image, but requires the src be .xml. This causes a problem, Javascript can't access the object, Javascript has svgDocument which can only access .svg image.
If we embed image as .svg file, template will displays the content of text, rather than an image.
Hope Smarty, maybe next version, can get overcome this issue, and support .svg as images. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Wed Mar 04, 2009 3:26 pm Post subject: |
|
|
What does this have to do with smarty? You should link directly to your .svg image just like a .png or .jpg (?) If you want your templates to generate XML, you need to set your content-type accordingly in PHP. |
|
Back to top |
|
phpsmarty Smarty n00b
Joined: 04 Mar 2009 Posts: 2
|
Posted: Wed Mar 04, 2009 7:57 pm Post subject: |
|
|
Sorry.
It does NOT matter with Smarty.
It is a problem with Apache configure. By adding a line "image/svg+xml svg" to mime.type, the problem was resolved.
Thanks, mohrt. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|