title: How do you check the Liferay version in a FreeMarker template?
body: <p>I am working on a theme for Liferay that I wish to work with both versions 7.2 and 7.3 of Liferay. How can I check what version is being used within the template, so I can do code like this:</p>
  
  <pre class="lang-freemarker prettyprint-override"><code>    &lt;#if liferay_version == "7.3"&gt;
        &lt;p&gt;Liferay 7.3&lt;/p&gt;
      &lt;#elseif liferay_version == "7.2"&gt;
        &lt;p&gt;Liferay 7.2&lt;/p&gt;
      &lt;/#if&gt;
  </code></pre>
  
  <p><strong>Update (21/08):</strong><br>
  I have tried the using <code>assign</code> to get the service (as <code>set</code> can't be used in the template), but <code>serviceLocator</code> is <code>null</code>. <code>&lt;#assign releaseLocalService = serviceLocator.findService("com.liferay.portal.service.ReleaseLocalService")&gt;</code></p>