About Mobile Detect

Mobile Detect uses a lightweight PHP class for detecting mobile devices (including tablets).

Category 1Markup Generation
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Category 2Other Modules
Modules that have a unique purpose not covered by existing categories.
Release StateStable
Should be safe for use in production environments. *
Module Version0.0.5
Class NameMobileDetect
Compatibility2.4, 2.5, 2.6, 2.7
Date AddedOctober 15, 2014
Last UpdatedJanuary 7, 2018
Recommended ByNew recommendations may take up to 1 day to appear.


This module's files should be placed in /site/modules/MobileDetect/
How to install or uninstall modules


WARNING: This repository is no longer maintained ⚠️

This repository will not be updated. The repository will be kept available in read-only mode.

ProcessWire Mobile Detect


Mobile Detect uses a lightweight PHP class (Mobile_Detect) for detecting mobile devices (including tablets).

Designed for use with ProcessWire 2.4/2.5 http://processwire.com


  1. Clone the module and place MobileDetect in your site/modules/ directory.
git clone https://github.com/justonestep/processwire-mobiledetect.git your/path/site/modules/MobileDetect
  1. Login to ProcessWire admin and click Modules.
  2. Click "Check for new modules".
  3. Click "install" next to the new SimpleContactForm module.


This Module extends $config and sets the following parameters:

$config->mobileDetect = array(
  'deviceType' => 'deviceType (phone, tablet or desktop)',
  'browser' => 'mobile browser',
  'operatingsystem' => 'mobile operatingsystem',
  'device' => 'mobile device'

You can access them where ever you want.
See the example below:

  <body class="devicetype--<?php echo $config->mobileDetect->deviceType?>">
  <body class="devicetype--{{config.mobileDetect.deviceType}}"> // twig

Results in:

<body class="devicetype--phone"> OR
<body class="devicetype--tablet"> OR
<body class="devicetype--desktop">