Skip to content
simple extension to detect mobile devices
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_config
src/Extension
.gitattributes
LICENSE
README.md
composer.json

README.md

silverstripe-mobiledetect

Requirements

  • silverstripe/cms ^4
  • mobiledetect/mobiledetectlib ^2

Installation

Install a module via Composer

composer require derralf/silverstripe-mobiledetect

DataObject gets extended automatically

Usage


PHP:

if $this->isMobile() ...

if $this->isTablet() ...

if $this->isPhone() ...


Templates:

<% if $isMobile %> ...

<% if $isTablet %> ...

<% if $isPhone %> ...


You can’t perform that action at this time.