The user agent plugin provides a simple way to detect the kind of device that made the request.
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Agent
CHANGELOG.md
LICENSE
README.md
agent.php
agent.yml

README.md

Agent

The user agent plugin provides a simple way to detect the kind of device that made the request.

Installation

See this instruction

Usage in templates

Detect mobile device

{if Agent::isMobile()}
    // Do something...
{/if}

Detect robot or crawler

{if Agent::isRobot()}
    // Do something...
{/if}

Detect specific device

{if Agent::is('iphone')}
    // Do something...
{/if}

Options

name value description
enabled true or false to disable the plugin

License

See LICENSE