stckvrw
stckvrw

Reputation: 1791

Is there build-in way to detect user agent inside a template?

Is there build-in Twig way to detect user agent and user IP if website is powered by Drupal 8.x ?

Something like app.request.headers.get('User-Agent')

I mean without adding custom Twig function on PHP

Upvotes: 0

Views: 405

Answers (1)

MilanG
MilanG

Reputation: 7114

You can try using Browser detect module: https://www.drupal.org/project/browser_detect

Upvotes: 1

Related Questions