<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>[SOLVED] Print svg file content from custom theme inside Web Content FTL</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113661575" />
  <subtitle>[SOLVED] Print svg file content from custom theme inside Web Content FTL</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=113661575</id>
  <updated>2026-04-04T20:40:08Z</updated>
  <dc:date>2026-04-04T20:40:08Z</dc:date>
  <entry>
    <title>RE: Print svg file content from custom theme inside Web Content FTL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113695561" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113695561</id>
    <updated>2019-05-20T09:18:38Z</updated>
    <published>2019-05-20T09:18:38Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Solved in the following way:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign
&amp;amp;nbsp; SystemProperties = staticUtil["com.liferay.portal.kernel.util.SystemProperties"]
&amp;amp;nbsp; fileUtil = staticUtil["com.liferay.portal.kernel.util.FileUtil"]
&amp;amp;nbsp; catalinaHome = SystemProperties.get("catalina.home")
&amp;amp;nbsp; svgFilePath = catalinaHome + "/webapps" + themeDisplay.getPathThemeRoot() + "/images/circle.svg"
&amp;amp;nbsp; svgFileContent = fileUtil.read(svgFilePath)
&amp;amp;nbsp; docXml = saxReaderUtil.read(svgFileContent)
&amp;amp;nbsp; iconSVGMarkup = docXml.getRootElement().asXML()
/&amp;amp;gt;
${iconSVGMarkup}&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-05-20T09:18:38Z</dc:date>
  </entry>
  <entry>
    <title>[SOLVED] Print svg file content from custom theme inside Web Content FTL</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113661574" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113661574</id>
    <updated>2019-05-17T09:38:43Z</updated>
    <published>2019-05-17T09:38:43Z</published>
    <summary type="html">Hi everyone.&lt;br /&gt;I have an SVG file under my custom theme: &lt;strong&gt;/my-custom-theme/images/circle.svg&lt;/strong&gt;.&lt;br /&gt;In a freemarker Web Content template I would like to print that icon markup.&lt;br /&gt;How to read that file and print it inside my template?&lt;br /&gt;Thank you.</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-05-17T09:38:43Z</dc:date>
  </entry>
</feed>
