Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heimrichhannot/contao-location-bundle
https://github.com/heimrichhannot/contao-location-bundle
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/heimrichhannot/contao-location-bundle
- Owner: heimrichhannot
- License: other
- Created: 2019-06-04T13:26:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T20:28:18.000Z (about 2 years ago)
- Last Synced: 2024-09-18T11:19:31.833Z (3 months ago)
- Language: PHP
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Contao Location Bundle
This bundle adds a location entity to contao.
## Features
- adds a new (nestable) location entity
- ConfigElementType for [List](https://github.com/heimrichhannot/contao-list-bundle) and [Reader bundle](https://github.com/heimrichhannot/contao-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:```php
$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',
]
```