fenom:
force_compile: true
cache:
enabled: false
errors:
display: true
require_once 'lib/Mobile_Detect.php';
Action::add('before_page_rendered', function () {
Detect::init();
});
class Detect
{
protected static $detect;
public static function init()
{
static::$detect = new Mobile_Detect();
}
public static function isMobile()
{
return static::$detect->isMobile();
}
}
{if Detect::isMobile()}
this is for mobile
{/if}