Plugin

Archived
Forum
(read-only)

Detect Mobile

ExpressionEngine 2, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From Gareth Davies

     

Conditional for kindle?

Support Request

energycell
energycell

Hi,

Is there a way to detect Kindle / Kindle Fire specifically and conditionally show content for those users?

Thanks.

ITU Webmaster
# 1
Developer
ITU Webmaster

Hi,

It’s not possible with this version of the plugin but I’m pretty sure it’s very possible with the mobile detect class. I’ll take a look and get back to you.

ITU Webmaster
# 2
Developer
ITU Webmaster

Hi,

I’ve added this functionality to a new branch which you can get here:

https://github.com/garethtdavies/detect-mobile/tree/platform-detection

You can then use as follows:

{if '{exp:detect_mobile:platform platform="Kindle"}'
     I am a Kindle
{if
:else}
     I am not a Kindle
{
/if} 

This new platform method supports a whole range of devices, you can find the full list in the readme file on that branch.