Documentation
Site building

Fields and display

Add fields to podcasts and episodes, show the audio player, and override templates.

Podcasts and episodes are Drupal entities with their own field settings, separate from content types.

EntitySettings page
PodcastStructure → Podcasts (/admin/structure/podcast)
Podcast EpisodeStructure → Podcast Episode (/admin/structure/podcast-episode)

With Drupal's Field UI module enabled, each settings page has the usual Manage fields, Manage form display, and Manage display tabs. Opening the settings page needs Administer podcast settings or Administer podcast episode settings. The tabs need Field UI's permissions, such as Podcast: Administer fields and Podcast Episode: Administer display.

Add a field

  1. Open Manage fields on the Podcast or Podcast Episode settings page.
  2. Click Create a new field and configure it as you would on a content type.
  3. Arrange it on Manage form display and Manage display.

The built-in fields, such as Title, Audio File, and Shownotes, are defined by the module. You can arrange, hide, and format most of them, but not delete them or change their storage settings.

A new field does not appear in the RSS feed automatically. To use it for a feed tag, see Customize the feed.

Show the audio player and shownotes

On a new site, an episode's page shows its label, author, dates, and keywords, but not the audio or the shownotes. To show them:

  1. Open Structure → Podcast Episode → Manage display (/admin/structure/podcast-episode/display).
  2. Move Audio File and Shownotes from the Disabled section into the content region.
  3. Set the Audio File format to Audio, Drupal's built-in HTML5 player.
  4. Click Save.

If you use episode pages, open Manage display for the Podcast Episode Page content type and set the Podcast Episode field's format to Rendered entity. The page then shows the episode with the display configured above.

The Download Tracker URL formatter outputs the tracked URL as plain text, not a player. Plays in the website's player are therefore not counted unless a custom template feeds the tracked URL to the player. See Analytics.

Override templates

The module ships two templates in its templates directory:

TemplateRenders
podcast.html.twigA podcast page
podcast-episode.html.twigAn episode page

To change the markup, copy a template into your theme's templates directory, edit it, and clear caches with drush cr. Both templates print content, which holds the fields in the order set on Manage display. The module provides no template suggestions per view mode, so one template applies to every display.

The feed template is covered in Customize the feed.