Mobile Detection and Redirection

Description

Simple mobile detection and redirection in dotCMS

Link: http://dotcms.com/docs/latest/javadocs/com/dotmarketing/beans/Clickstream.html

Code

${esc.hash}set(${esc.dollar}clickstream  = ${esc.dollar}session.getAttribute("clickstream"))
${esc.hash}if(${esc.dollar}clickstream.isMobileDevice())
  ${esc.dollar}response.sendRedirect('http://m.site.com')
${esc.hash}end