Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Events List

No security coverage

Part of the Events ecosystem · 6 projects

View on drupal.org

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.

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 Release date
1.3.x-dev Dev Jan 21, 2023
1.2.x-dev Dev Jan 18, 2023