Forum Discussion

peterlu's avatar
peterlu
Champion
12 years ago

view mode detection, desktop or mobile

Since there is no mobile version of "Front page welcome text" section in admin area, I am going to put freemarker to detect the view mode. example: if in mobile view mode     hello mobile else  ...
  • VenkS's avatar
    12 years ago

    You could try this:

     

    <#if clientDevice.desktop>
      <#-- do something -->
    </#if>
     
    <#if clientDevice.mobile>
      <#-- do something -->
    </#if>