Example Drupal Module - Based on TMDB API
This module integrates with The Movie Database (TMDB) API to display popular movies in Drupal. It provides a new block for showcasing popular movies and a new page to view detailed information about each movie.
- Download and extract the module files into the Drupal modules directory.
- Enable the "TMDB Movies" module in the Drupal admin panel.
This module has the following requirements:
- Drupal 10 or later.
- A valid TMDB API key. You can obtain one by creating an account on the TMDB website and generating an API key.
- Modify both
MovieController.php
andMovieBlock.php
to change your API key.
- Edit the desired Drupal page.
- Add a new block to the page.
- Select the "Movie Block" block from the available blocks.
- Save the changes to the page.
The module provides a new page to view detailed information about each movie. To access a movie's details page, use the following URL pattern: /movie/:id
, where :id
is the unique identifier of the movie in TMDB.