Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters · mod_geoip
  • Reference
  • Frontend developer
  • Geolocation
  • Template filter
  • Query
  • Structured data

ip2geo

Module

mod_geoip

Return geographic information associated with an IP address.

The input can be a textual or tuple IP address. The result is a map supplied by the configured GeoIP database, or undefined when the address cannot be located.

For example:

{% with "8.8.8.8"|ip2geo as geo %}
    {{ geo.country.iso_code }}
{% endwith %}

Edit on GitHub

Related documentation

Filters

translated_texts

Check all properties of a map, list or resource. Returns a list of all properties that are translated (have a #trans{} record) and their…

Filters

survey_page_options

Check the list of blocks and collect all options for that page.

Filters

survey_result_column_values

Used by the survey module to add extra column values to the result editor.

Filters

ip2country

Return the lowercase ISO country code associated with an IP address.

Filters

extract

Extract a specific property from each item in a list.

Filters

sum

Sum a list of numbers.

Filters

filter_by

Filter a list of items based on a property value and optional predicate.

Filters

trans_languages

Return a list of all languages present in the given translated text ( #trans{} record).

Filters

media_for_language

Filter a list of media items by their medium_language property, return the best matching with the current or given language. Only visible…

GitHub © 2026 Zotonic