Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Events List

No security coverage No further development 8 sites

Part of the Events ecosystem · 8 projects

This module displays all published events on a dedicated page, showing them in a card layout. Each event card includes an image that enlarges on hover, and users can click to navigate to a detailed event page.

A module to display all events on a page from content type named as event with fields name, description, place, date, image and star rating.

Functionality:
All published events are visible on /list-events.
Each event is displayed in card layout with 3 card in a row and maximum number of rows as much as events are present in content type event.
Image popout on hover event image.
Ability to redirect to event detail page from event list page.

Approach :
Made a content type event in Drupal CMS.
Added 7 events to event content type.
Created custom module folder events with /events/events.info.yml.
Created routing file /events/events.routing.yml to route a COntroller.
Created controller /events/src/Controller/EventsController.php to extract all nodes of event content type in $data[] and returned #theme and #items($data[]).
Created module file /events/events.module to parse the #theme as a twig template and #items as a variables using hook_theme().
Created template file /events/templates/listevents.html.twig and consumed variables using .operator on items.
Created css file /events/css/listevents.css to style /list-events page.
Created library events.list_events in events/events.libraries.yml to add css listevents.css and font-awesome library for star rating.
Attached library events.list_events to EventsController using #attached keyword.
Added style to contoller using listevents.css file.

Ask your assistant about Events List

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jan 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.3.x-dev Dev 8–10 Jan 21, 2023
1.2.x-dev Dev 8–10 Jan 18, 2023