You are here

device-geolocation-visitor-info.html.twig in Smart IP 8.3

device-geolocation-visitor-info.tpl.php Default theme implementation for rendering user's geolocation details block.

Available variables:

  • location: An associative array with possible array items:

-- Latitude: May came from Smart IP or W3C Geolocation API -- Longitude: May came from Smart IP or W3C Geolocation API -- Street Number: Google Geocoder service specific item -- Postal Code: Google Geocoder service specific item -- Route: Google Geocoder service specific item -- Neighborhood: Google Geocoder service specific item -- Locality: Google Geocoder service specific item -- Sublocality: Google Geocoder service specific item -- Establishment: Google Geocoder service specific item -- Administrative Area Level N: Google Geocoder service specific item -- Country: May came from Smart IP or Google Geocoder service -- Country Code: May came from Smart IP or Google Geocoder service -- Zip: Smart IP specific item -- Region: Smart IP specific item -- Region Code: Smart IP specific item -- Time Zone: Smart IP specific item -- Ip Address: Smart IP specific item -- Timestamp: Timestamp of these data stored

File

modules/device_geolocation/templates/device-geolocation-visitor-info.html.twig
View source
  1. {#
  2. /**
  3. * @file device-geolocation-visitor-info.tpl.php
  4. * Default theme implementation for rendering user's geolocation details block.
  5. *
  6. * Available variables:
  7. * - location: An associative array with possible array items:
  8. * -- Latitude: May came from Smart IP or W3C Geolocation API
  9. * -- Longitude: May came from Smart IP or W3C Geolocation API
  10. * -- Street Number: Google Geocoder service specific item
  11. * -- Postal Code: Google Geocoder service specific item
  12. * -- Route: Google Geocoder service specific item
  13. * -- Neighborhood: Google Geocoder service specific item
  14. * -- Locality: Google Geocoder service specific item
  15. * -- Sublocality: Google Geocoder service specific item
  16. * -- Establishment: Google Geocoder service specific item
  17. * -- Administrative Area Level N: Google Geocoder service specific item
  18. * -- Country: May came from Smart IP or Google Geocoder service
  19. * -- Country Code: May came from Smart IP or Google Geocoder service
  20. * -- Zip: Smart IP specific item
  21. * -- Region: Smart IP specific item
  22. * -- Region Code: Smart IP specific item
  23. * -- Time Zone: Smart IP specific item
  24. * -- Ip Address: Smart IP specific item
  25. * -- Timestamp: Timestamp of these data stored
  26. *
  27. * @see template_preprocess_device_geolocation_visitor_info()
  28. *
  29. * @ingroup themeable
  30. */
  31. #}
  32. {% if location is not empty %}
  33. <dl>
  34. {% for label, value in location %}
  35. <dt>{{ label }}</dt>
  36. <dd>{{ value }}</dd>
  37. {% endfor %}
  38. </dl>
  39. {% endif %}