About

Radius search System Plugin for Joomla 4/5/6 articles with Custom Fields. Add radius search functionality to Joomla Category Blog views. Filter articles by distance using Custom Fields for latitude and longitude. Works well for store locators, branch finders, and local directories with moderate article counts:

  • Location-based article filtering by distance
  • Google Maps Geocoding integration for address-to-coordinate conversion
  • Multiple search configurations for different URL paths
  • Optional custom field filters - combine location with up to 3 additional criteria
  • Optional distance calculation and injection into a custom field
  • Flexible filtering - missing parameters are automatically ignored
  • Distance sorting (nearest first or vice versa)
  • Visual debug mode for troubleshooting
  • Test mode for development without API quota usage
  • The plugin now fully supports pagination in Joomla and YOOtheme Pro
  • YOOtheme Pro compatible

Note: Best suited for datasets up to a few hundred articles. For larger datasets, consider dedicated geospatial database solutions.

Installation

Install the Plugin in the Joomla Backend and configure it under System -> Plugins -> System - netzSINN Custom Fields Radius Search.

Set the Google Maps API key.

Configure the Plugin:

Make sure to provide the following data

  • A Custom Field for the Latitude and a Custom Field for the Longitude.
  • A input parameter for the address and a input parameter for the radius. You can define these query names in the Plugin's configuration.
  • To narrow down the search result you can provide up to 3 more Custom Fields / query parameters.

Distance configuration

The plugin can inject calculated distance values into a Joomla Custom Field, making them accessible in your template system (e.g., YOOtheme Pro Builder).
  • 1. Create a Custom Field, i. e. a text field "Distance"
  • 2. Configure the Plugin. Activate distance field. Select your Custom Field from the dropdown. Choose output format. Set decimal Places. Activate the addition of unit suffix (e.g., "182 km" vs "182")
  • 3. Use in Templates. The Custom Field now contains the formatted distance value and can be used like any other field.

Note: Distance values are calculated at runtime and not stored in the database. They only appear when a radius search is performed.

Performance Considerations

This plugin works great for:

  • Small to medium datasets (up to ~500 articles)
  • Store locators with limited locations
  • Event listings for local areas
  • Branch/office finders

For larger datasets or high-traffic sites, consider:

  • Database indexing on Custom Fields
  • Caching strategies
  • Copy your data into a flat table
The plugin uses Joomla's Custom Fields system, which performs JOINs on the fields_values table. Performance depends on your server configuration and database optimization.

How to use

If set up correctly you may open your page and add the query parameters. In the example above the URL would look like this:

https://mysite/myurl?address=Berlin&radius=100&status=1

You can provide a form to select the parameters and send them to the page as well. 

Pagination Support

The plugin now fully supports pagination in Joomla and YOOtheme Pro. When users navigate through multiple pages of search results, all search parameters are automatically preserved.

When a radius search is performed with parameters like:

https://mysite/myurl?address=Berlin&radius=100&status=1

And the user clicks to the next page, Joomla typically generates URLs like:

https://mysite/myurl?start=5

The plugin automatically:

  • Stores all search parameters (radius, address, filters) in the PHP session on the first search
  • Restores these parameters automatically when pagination occurs
  • Maintains filter consistency across all result pages

This ensures that pagination works seamlessly without requiring any special configuration.

The plugin injects a window.NetzSinnRadiusSearch object containing all active search parameters:

console.log(window.NetzSinnRadiusSearch);

// Example output:
window.NetzSinnRadiusSearch = {
  "radius": "760",
  "address": "Kassel",
  "lat": 51.3118828,        // jetzt als Number
  "lng": 9.4915751,         // jetzt als Number
  "path": "radiussearch",
  "order": "ASC",           // NEU: Sort Order
  "fieldLat": 15,           // NEU: ID des Latitude Custom Field
  "fieldLng": 16,           // NEU: ID des Longitude Custom Field
  "filters": {              // Deine aktiven Filter
    "color": "",
    "status": "1"
  },
  "distance": {             // NEU: Distance Field Config (falls aktiviert)
    "enabled": true,
    "fieldId": 25,
    "unit": "km",
    "decimals": 1,
    "showUnit": false
  }
}

// Show the current search parameters to users:

if (window.NetzSinnRadiusSearch) {
  const info = `Showing results within ${window.NetzSinnRadiusSearch.radius}km of ${window.NetzSinnRadiusSearch.address}`;
  document.getElementById('search-info').textContent = info;
}

System Requirements

Joomla 4.3, Joomla 5, Joomla 6

Changelog

  • v1.3.3 Updated comments and documentation for clarity and accuracy
  • v1.3.2 Pagination now preserves all search parameters via session storage. New: JavaScript API provides frontend access to search parameters through window.NetzSinnRadiusSearch object, enabling custom map integrations and dynamic UI enhancements. Includes code modernization with comprehensive type hints and removal of legacy methods. appears when a radius search is performed.
  • v1.3.1 Optimized formatting of distance field. The field is calculated at runtime and only appears when a radius search is performed.
  • v1.3.0 An optional distance custom field can be added and configured to render the distance in the output.
  • v1.2.8 Bugfix: Fixes critical issue preventing filters with value "0" from working (e.g., status=0). Additional custom field filters now accept all numeric values including zero.
  • v1.2.7 Feature: Additional custom field filters are now optional. Fields without URL parameters are ignored, no error messages for missing parameters. Enables flexible filtering by any subset of configured fields.
  • v1.2.6 Enhancement: SQL query with syntax highlighting integrated into debug panel. Structured debug output completely replaces old plain-text display.
  • v1.2.5 Bugfix: Added diagnostics for model loading issues. Shows detailed information about when and if the custom ArticlesModel is loaded.
  • v1.2.4 Bugfix: Fixes model override under Joomla 6. Custom ArticlesModel now loads with correct namespace. Debug panel confirms successful model loading.
  • v1.2.3 Major Update: Completely redesigned debug system with structured, collapsible panel. New features: Test mode (direct lat/lng input without Google API), SQL query formatting, Haversine formula explanation, result statistics. Enhanced Google Maps API error handling with timeout (10s).
  • v1.2.2 Uncommented obsolete configuration field call on obsolete field_latlng config parameter.
  • v1.2.1 Fixed changelog url in manifest
  • v1.2.0 Refactored plugin to embrace Joomla 6
  • v1.1.0 Refactored plugin to embrace Joomla 4 service provider architecture B/C
  • v1.0.0 Experimental release

License

GNU general public license

Download

Please, support this extension and review on Joomla Extension Directory JED!