heimrichhannot/contao-location-bundle

This bundle adds a location entity to contao.

Maintainers

Package info

github.com/heimrichhannot/contao-location-bundle

Type:contao-bundle

pkg:composer/heimrichhannot/contao-location-bundle

Statistics

Installs: 463

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.2.2 2025-03-20 10:09 UTC

This package is auto-updated.

Last update: 2026-03-10 09:44:15 UTC


README

This bundle adds a location entity to contao.

Features

Setup and Usage

Installation

Install via composer: composer require heimrichhannot/contao-location-bundle and update your database.

Usage

A typical use case for location is to set location in another entity like news or events. So you need to add it to the destiny bundle dca. There are many ways in contao to make a connection to locations like selects or checkboxes. Our recommendation is to use the contao picker widget:

$dca['tl_news']['fields']['locations'] = [
    'inputType' => 'picker',
    'relation' => ['type' => 'hasOne', 'load' => 'eager', 'table' => 'tl_location'],
    'eval' => [
        'multiple' => true, //
        'tl_class' => 'w50 clr autoheight'
    ],
    'sql' => 'blob NULL',
]