tcarter
13 years agoHelper
Is there a Freemarker object for templates?
I have a custom component that loads a bunch of javascript for the desktop template that I do not want loading for our mobile template. Is there a Freemarker object I can use? Here is a fictitio...
- 13 years ago
You can use the "clientDevice" freemarker context object -- here is an example:
<#if clientDevice.mobile> <#-- load all the heavy javascript not needed for mobile here --> </#if>