Reputation: 1791
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
Reputation: 7114
You can try using Browser detect module: https://www.drupal.org/project/browser_detect
Upvotes: 1