Releases: oveleon/contao-member-extension-bundle
Releases · oveleon/contao-member-extension-bundle
1.6.1
1.6.0
1.5.1
1.5.0
Feature
This update has been sponsored by @netzarbeiter
- Integrated sortable data-tables for member_list (https://datatables.net/)
- requires jquery to work
Setup
- use
mod_memberList_table
&memberExtension_list_row
as templates within the member-list module - activate the
j_datatables
jQuery template within your layout settings
Additional settings
Additional settings can be found within the data-attributes of the mod_memberList_table
template
Attribute | Default | Description |
---|---|---|
data-zero-label | No matching records found |
Label for zero matches |
data-search-label | Search: |
Search box label |
Please refer to the documentation of https://datatables.net/ and the initialization within j_datatables
to enhance this feature with more options
Please mind, that using this new feature will disable the server-sided pagination.
The datatables Pagination will work > 10 items per page.
Full Changelog: 1.4.2...1.5.0
1.4.2
1.4.1
1.4.0
This update was funded by @netzarbeiter
Additions
- simultaneous Contao 4.13 and 5.3 compatibility
- Hooks (see below)
- Frontend Filters (see below)
- alias generation (activate in module)
- go back page
Changes
- rewrote hooks
- rewrote modules to frontend controllers
- rewrote avatar upload to
Symfony/UploadedFile
Filter
Allows filtering the member list in the frontend if the following conditions are met:
- 'Activate filters' is set to true within the member list module
- there exists fields within
tl_member
of inputTypecheckbox
and evaluationfeFilterable
set to true
Hooks
getMembers
Allows modifying the columns and options for the database query.
// src/EventListener/onGetMembersListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberListController;
#[AsHook('getMembers')]
class onGetMembersListener
{
public function __invoke(array &$columns, array &$options, MemberListController &$context): void
{
// Do something...
}
}
parseMemberReader
Allows modifying the member detail page
// src/EventListener/onParseMemberReaderListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\MemberModel;
use Contao\Model;
use Contao\ModuleModel;
use Contao\Template;
use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberReaderController;
#[AsHook('parseMemberReader')]
class onParseMemberReaderListener
{
public function __invoke(MemberModel|Model &$member, Template &$template, ModuleModel &$model, MemberReaderController &$context): void
{
// Do something...
}
}
parseMemberTemplate
Allows modifying the member details
// src/EventListener/onParseMemberTemplateListener.php
namespace App\EventListener;
use Contao\CoreBundle\DependencyInjection\Attribute\AsHook;
use Contao\FrontendTemplate;
use Contao\MemberModel;
use Contao\Model;
use Contao\ModuleModel;
use Oveleon\ContaoMemberExtensionBundle\Controller\FrontendModule\MemberExtensionController;
#[AsHook('parseMemberTemplate')]
class onParseMemberTemplateListener
{
public function __invoke(MemberModel|Model &$member, array &$fields, FrontendTemplate &$template, ModuleModel &$model, MemberExtensionController &$context): void
{
// Do something...
}
}
Full Changelog: 1.3.2...1.4.0