MetaModels
2.4
  • Introduction to MetaModels
  • Feature Overview
  • Installing and Updating MetaModels
  • Components of a MetaModel
    • Workflow in MetaModels
    • New MetaModel
    • Attributes
    • Render Settings
    • Input Forms
    • Visibility Conditions / Sub-Palettes
    • Indexing
    • Filter Sets
      • Introduction
      • Types of Filter Rules
      • Configuration Parameters
      • Procedure
      • Details of All Filter Rules
        • Predefined Item Set
        • Simple Lookup
        • Custom SQL
        • AND Condition
        • OR Condition
        • Expression Rule
        • Checkbox Status
        • Translated Checkbox Status
        • Yes / No
        • Value from/to for one field
        • Value from/to for one date field
        • Value from/to for two fields
        • Value from/to for two date fields
        • Single Select
        • Multi-Select
        • Text Filter
        • Perimeter Search
        • Register
        • Levenshtein-based Search
        • Filter-by-related
        • Loupe
        • Parent Filter
    • Input/Render Assignments
    • Content Elements/Modules for Frontend Output
    • Relations in MetaModels
    • Schema Manager
    • Symfony Translation
    • Templates in MetaModels
    • Storing Data Types as Attributes
    • Multilingual Support in MetaModels
    • Insert Tags
  • The First MetaModel
  • Extensions
  • MetaModels “Cookbook”
  • Videos and Podcasts about MetaModels
  • MetaModels Reference and API
  • Imprint, Privacy Policy, Licence, Credits
MetaModels
  • Components of a MetaModel
  • Filter Sets
  • Perimeter Search
  • Edit on GitHub

img_filter_perimetersearch Perimeter Search

The “Perimeter Search” filter rule (package filter_perimetersearch) filters items based on their geographic position. Visitors enter an address or coordinates and choose a search radius; the filter rule finds all items whose geocoordinates (latitude/longitude) lie within the specified perimeter.

A prerequisite is that items have geocoordinates stored in two separate decimal attributes (latitude and longitude). External lookup services are used for geocoding addresses to coordinates (e.g. OpenStreetMap/Nominatim, Google Maps API).

See also

Detailed documentation on perimeter search: Perimeter Search

Installation

The filter rule is installed via the Contao Manager or Composer:

composer require metamodels/filter_perimetersearch

Settings when Creating the Filter Rule

Setting

Description

Type

Selection of the filter rule type — here: “Perimeter Search”.

Enabled

Enables or disables this filter rule.

Comment

Free text field for describing the purpose of this filter rule.

Data mode

Defines how the geocoordinates of items are stored:

  • Single attribute — The coordinates are stored in a single combined attribute (e.g. “lat,long” as text). Additional option: Attribute (single) — Selection of the attribute.

  • Two attributes — Latitude and longitude are stored in two separate attributes. Additional options: First attribute (lat) and Second attribute (long).

URL parameter

The key of the URL parameter for passing the address/coordinate input.

Settings for the Frontend Widget

Setting

Description

URL parameter

The key of the URL parameter for passing the filter value. Without input, the column name of the attribute is used. With auto_item, only the value — without key — is embedded in the URL.

URL type for the parameter

Defines whether the parameter is passed as a slug (friendly URL) or as a GET parameter (from MM 2.4) — see SEO

Label

Label of the address input field.

Placeholder

Placeholder text in the address input field.

Template (address field)

Template for the output of the address input field.

Label (perimeter)

Label of the perimeter selection widget.

Template (perimeter)

Template for the output of the perimeter widget. Default: mm_filteritem_default.

Perimeter mode

Defines how the search radius is determined:

  • Free — The visitor enters the radius as a numeric value. Additional option: Placeholder (perimeter).

  • Preset — A fixed radius is used. Additional option: Radius preset (kilometer value).

  • Selection — The visitor selects from a predefined list of radii. Additional option: Radius selection (MCW table with value and default flag).

Country mode

Defines whether and how a country is specified for geocoding:

  • No country — No country filter.

  • Preset — Fixed country (ISO code). Additional option: Country preset.

  • GET parameter — The country is passed via a URL parameter. Additional option: Country GET parameter.

Lookup service

Configuration of the geocoding service (MCW table):

  • Service — Selection of the geocoding service (e.g. Nominatim, Google Maps).

  • API token — Optional API key for paid services.

Matching Attributes

The “Perimeter Search” filter rule requires geocoordinates in decimal form:

  • Decimal (for latitude and longitude separately)

Additionally, the Geo distance attribute can be used for display and sorting by distance.

Previous Next

© Copyright 2026, Team MetaModels. Last updated on 06-12-2026.