heimrichhannot / contao-member-listing-bundle
Add list and reader elements for members.
Installs: 200
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^4.13 || ^5.0
- doctrine/dbal: ^3.0 || ^4.0
- spatie/schema-org: ^3.0
- symfony/http-foundation: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
Requires (Dev)
- contao/manager-plugin: ^2.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-symfony: ^2.0
README
This bundle provides a simple content element to list frontend members.
Features
- List frontend members
- Choose the members to show with a member picker wizard
- JSON-LD with the selected member's data included
- Supports showing member images
Installation
Install via composer or contao manager.
composer require heimrichhannot/contao-member-listing-bundle
Then, update your database.
Usage
- Create a new content element of type "Member list" and configure it as needed.
- Customize the template
content_element/member_list
to your needs.
Member images
This bundle comes with support for member images. To use this feature, you need to add an image field (singleSRC
) to your member dca.
Afterward you get a size selection in the content element configuration.
Two templates with image support are already bundled.
<?php # /contao/dca/tl_member.php $GLOBALS['TL_DCA']['tl_member']['fields']['singleSRC'] = [ 'exclude' => true, 'inputType' => 'fileTree', 'eval' => ['filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => true, 'tl_class' => 'clr'], 'sql' => "binary(16) NULL", ];
For legacy compatibility, you may also add an
addImage
field to your member dca, to toggle the image display on or off. This is however discouraged and will be removed in future versions of this bundle.