stephenjbell

dotCMS - Change template based on web address

Aug 16th, 2011
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #set($requestURL = "$request.getRequestURL()")
  2. #set($isMobileDomain = $requestURL.matches("^https?:\/\/m\..*"))
  3.  
  4. #if($isMobileDomain)
  5. MOBILE TEMPLATE
  6. #else
  7. REGULAR TEMPLATE
  8. #end
Advertisement
Add Comment
Please, Sign In to add comment