Created
March 19, 2013 06:03
-
-
Save hissy/5194015 to your computer and use it in GitHub Desktop.
#concrete5 How to use mobile detect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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