This project is not covered by Drupal’s security advisory policy.
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.
| Attachment | Size |
|---|---|
| all events landing page.png | 506.17 KB |
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.No further development
No longer developed by its maintainers.- Project categories: Content display
7 sites report using this module
- Created by plystudy on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.





