Skip to content

Instantly share code, notes, and snippets.

@hissy
Created March 19, 2013 06:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hissy/5194015 to your computer and use it in GitHub Desktop.
Save hissy/5194015 to your computer and use it in GitHub Desktop.
#concrete5 How to use mobile detect
<?php
Loader::library('3rdparty/mobile_detect');
$md = new Mobile_Detect();
if($md->isMobile()) {
// mobile view
// sample : $this->inc(elements/mobile.php);
} else {
// not mobile view
// sample : $this->inc(elements/pc.php);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment