heimrichhannot / contao-location-bundle
This bundle adds a location entity to contao.
Installs: 244
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.9
- heimrichhannot/contao-utils-bundle: ^2.196
- symfony/dependency-injection: ^4.4 || ^5.0
- symfony/http-kernel: ^4.4 || ^5.0
README
This bundle adds a location entity to contao.
Features
- adds a new (nestable) location entity
- ConfigElementType for List and Reader bundle
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', ]