Template Reference

Podcast

podcast.title Title

podcast.subtitle Subtitle

podcast.summary Summary

podcast.imageUrl Image URL

podcast.authorName Author name

podcast.ownerName Owner name

podcast.ownerEmail Owner email

podcast.publisherName Publisher name

podcast.publisherUrl Publisher URL

podcast.episodes Episodes

Filter and order episodes with parameters:

  • post_id: one episode matching the given post id
  • post_ids: list of episodes matching the given list of post ids
  • slug: one episode matching the given slug
  • slugs: list of episodes matching the given list of slugs
  • post_status: Publication status of the post. Defaults to ‘publish’
  • order: Designates the ascending or descending order of the ‘orderby’ parameter. Defaults to ‘DESC’.
    • ASC’ - ascending order from lowest to highest values (1, 2, 3; a, b, c).
    • DESC’ - descending order from highest to lowest values (3, 2, 1; c, b, a).
  • orderby: Sort retrieved episodes by parameter. Defaults to ‘publicationDate’.
    • ‘publicationDate’ - Order by publication date.
    • ‘recordingDate’ - Order by recording date.
    • ‘title’ - Order by title.
    • ‘slug’ - Order by episode slug.

Examples

Iterate over all published episodes, ordered by publication date.

1
2
3
{% for e in podcast.episodes %}
  {{ e.title }}
{% endfor %}

Order by title in ascending order.

1
2
3
{% for e in podcast.episodes({orderby: 'title', 'order': 'ASC'}) %}
  {{ e.title }}
{% endfor %}

Fetch one episode by slug.

1
{{ podcast.episodes({slug: 'pod001'}).title }}

see episode

podcast.feeds Feeds

see feed

podcast.license License

To render an HTML license, use {% include '@core/license.twig' with {'license': podcast.license} %}

see license

podcast.setting Get a podcast setting.

Valid namespaces / names:

website merge_episodes hide_wp_feed_discovery use_post_permastruct custom_episode_slug episode_archive episode_archive_slug url_template force_download ssl_verify_peer metadata enable_episode_recording_date enable_episode_explicit enable_episode_license redirects podlove_setting_redirect tracking mode

podcast.contributors List of podcast contributors.

Examples:

1
2
3
4
5
{# iterating over a list of contributors #}
{% for contributor in podcast.contributors({scope: "podcast"}) %}
    {{ contributor.name }}
    {% if not loop.last %}, {% endif %}
{% endfor %}
1
2
3
4
5
6
7
8
{# iterating over a grouped list of contributors #}
{% for contributorGroup in podcast.contributors({scope: "podcast", groupby: "group"}) %}
    <strong>{{ contributorGroup.group.title }}:</strong> 
    {% for contributor in contributorGroup.contributors %}
        {{ contributor.name }}
        {% if not loop.last %}, {% endif %}
    {% endfor %}
{% endfor %}

Options:

  • id: Fetch one contributor by its id. Ignores all other parameters. Example: podcast.contributors({id: 'james'}).name
  • scope: Either “global”, “global-active” or “podcast”. - “global” returns all contributors. - “global-active” returns all contributors with at least one contribution in a published episode. - “podcast” returns the contributors configured in podcast settings. Default: “global-active”.
  • group: filter by group slug. Defaults to “all”, which does not filter.
  • role: filter by role slug. Defaults to “all”, which does not filter.
  • groupby: group or role slug. Group by “group” or “role”. If used, the returned data is has another layer for the groups. See examples for more details.
  • order: Designates the ascending or descending order of the ‘orderby’ parameter. Defaults to ‘DESC’.
    • ASC’ - ascending order from lowest to highest values (1, 2, 3; a, b, c).
    • DESC’ - descending order from highest to lowest values (3, 2, 1; c, b, a).
  • orderby: Sort contributors by parameter. Defaults to ‘name’.
    • ‘name’ - Order by public name.

podcast.services List of service profiles

Parameters:

  • category: (optional) “social”, “donation” or “all”. Default: “all”
  • type: (optional) Filter services by type. List of all service types: 500px, amazon wishlist, app.net, bandcamp, bitbucket, bitcoin, deviantart, diaspora, dogecoin, dribbble, facebook, flattr, flickr, generic wishlist, github, google+, instagram, jabber, last.fm, linkedin, litecoin, openstreetmap, paypal, pinboard, pinterest, playstation network, skype, soundcloud, soup, steam, steam wishlist, thomann wishlist, tumblr, twitter, website, xbox live, xing, youtube

Example:

1
2
3
4
5
{% for service in podcast.services({category: "social"}) %}
  <a target="_blank" title="{{ service.title }}" href="{{ service.profileUrl }}">
    <img width="32" height="32" src="{{ service.logoUrl }}" class="podlove-contributor-button" alt="{{ service.title }}" />
  </a>
{% endfor %}

Episode

episode.title Title

episode.subtitle Subtitle

episode.summary Summary

episode.slug Slug

episode.content Post content

episode.player Web Player for the current episode

episode.publicationDate Post publication date

Uses WordPress datetime format by default or custom format: {{ episode.publicationDate('Y-m-d') }}

see datetime

episode.recordingDate Post recording date

Uses WordPress datetime format by default or custom format: {{ episode.recordingDate('Y-m-d') }}

see datetime

episode.explicit Explicit status

“yes”, “no” or “clean”

episode.url URL

episode.duration Duration Object

Use duration to display formatted hours, minutes and seconds. Alternatively, use the duration accessors for custom rendering.

see duration

episode.imageUrl Image URL

episode.imageUrlWithFallback Image URL with fallback

Returns podcast image if no episode image is available.

episode.meta Access a single meta value

episode.metas Access a list of meta values

Example:

1
2
3
4
5
6
7
8
9
<ul>
  {% for meta in episode.metas("mymetakey") %}
    <li>{{ meta }}</li>
  {% endfor %}
</ul>

{% for meta in episode.metas("mymetakey") %}
  {{ meta }}{% if not loop.last %}, {% endif %}
{% endfor %}

episode.files List of episode files

see file

episode.chapters List of episode chapters

see chapter

episode.license License

To render an HTML license, use {% include '@core/license.twig' %} for a license with fallback to the podcast license or {% include '@core/license.twig' with {'license': episode.license} %} for the episode license only.

see license

episode.contributors List of episode contributors

Examples:

1
2
3
4
5
{# iterating over a list of contributors #}
{% for contributor in episode.contributors %}
    {{ contributor.name }}
    {% if not loop.last %}, {% endif %}
{% endfor %}
1
2
3
4
5
6
7
8
{# iterating over a grouped list of contributors #}
{% for contributorGroup in episode.contributors({groupby: "group"}) %}
    <strong>{{ contributorGroup.group.title }}:</strong> 
    {% for contributor in contributorGroup.contributors %}
        {{ contributor.name }}
        {% if not loop.last %}, {% endif %}
    {% endfor %}
{% endfor %}

Options:

  • id: Fetch one contributor by its id. Ignores all other parameters. Returns null if the id belongs to an existing contributor which is not part of the episode. Example: episode.contributors({id: 'james'}).name
  • group: group slug. If none is given, show all contributors.
  • role: role slug. If none is given, show all contributors.
  • groupby: group or role slug. Group by “group” or “role”. If used, the returned data is has another layer for the groups. See examples for more details.

Chapter

chapter.title Title

chapter.link Link

chapter.image Image

chapter.time Time

Feed

feed.title Title

feed.url URL

feed.discoverable Is the feed URL discoverable?

feed.passwordProtected Is the feed protected by a password?

feed.asset Asset

see asset

Asset

asset.title Title

asset.downloadable Is the asset downloadable?

asset.fileType File type

see file_type

File

file.id File id

file.episode Episode related to this file

see episode

file.asset Asset related to this file

see asset

file.size Size in bytes

file.url URL

Duration

duration.hours Hours

0,1,2,…

duration.minutes Minutes

0,1,2,…,59

duration.seconds Seconds

0,1,2,…,59

duration.milliseconds Milliseconds

0,1,2,…,999

duration.totalMilliseconds The total duration in milliseconds

0,1,2,…

FileType

file_type.name Name

file_type.type Type / group

One of those: audio, captions, chapters, ebook, image, metadata, video

file_type.mimeType Mimetype

file_type.extension Extension

Contributor

Requires the “Contributor” module.

contributor.visible Is the contributor public?

contributor.name Name

Public name of the contributor. If no public name is set, it defaults to the real name.

contributor.realname Real name

You should use contributor.name as display name.

contributor.nickname Nickname

contributor.publicname Public name

You should use contributor.name as display name.

contributor.role Contribution role

A role is only available for episode.contributors and podcast.contributors, not if you access the global contributors directly.

contributor.group Contribution group

A group is only available for episode.contributors and podcast.contributors, not if you access the global contributors directly.

contributor.comment Contribution comment

contributor.avatar Avatar image

Dimensions default to 50x50px. Change it via parameter: contributor.avatar(32)

To render an HTML image tag: {% include '@contributors/avatar.twig' with {'avatar': contributor.avatar} only %} or {% include '@contributors/avatar.twig' with {'avatar': contributor.avatar, 'size': 150} only %}

contributor.publicemail Email address for public use

contributor.contactemail Email address for internal use

contributor.flattr Flattr username

contributor.flattr_url Flattr URL.

When on a WordPress page, it returns the URL for the person. Otherwise a URL for that person in this specific episode is generated.

contributor.episodes Episodes with this contributor

see episode

contributor.services List of service profiles

Parameters:

  • category: (optional) “social”, “donation” or “all”. Default: “all”
  • type: (optional) Filter services by type. List of all service types: 500px, amazon wishlist, app.net, bandcamp, bitbucket, bitcoin, deviantart, diaspora, dogecoin, dribbble, facebook, flattr, flickr, generic wishlist, github, google+, instagram, jabber, last.fm, linkedin, litecoin, openstreetmap, paypal, pinboard, pinterest, playstation network, skype, soundcloud, soup, steam, steam wishlist, thomann wishlist, tumblr, twitter, website, xbox live, xing, youtube

Example:

1
2
3
4
5
{% for service in contributor.services({category: "social"}) %}
  <a target="_blank" title="{{ service.title }}" href="{{ service.profileUrl }}">
    <img width="32" height="32" src="{{ service.logoUrl }}" class="podlove-contributor-button" alt="{{ service.title }}" />
  </a>
{% endfor %}

ContributorGroup

Requires the “Contributor” module.

contributor_group.title Title

contributor_group.slug URL slug

contributor_group.contributors Contributors in this group.

Depending on context all contributors or just the contributors relevant to the current context.

see contributor

Service

Requires the “Social” module.

service.title Service title

service.description Service description

service.profileUrl Service profile URL

service.logoUrl Logo URL

License

license.name Name

license.url URL

license.imageUrl Image URL

license.creativeCommons Is this a creative commons license?

license.valid Is the license valid? Is all required data available?

license.html HTML

DateTime

datetime.year Year

datetime.month Month number

datetime.day Day of the month

datetime.hours Hours of the day, 24h format

datetime.minutes Minutes of the current hour

datetime.seconds Seconds of the current minute

datetime.format Custom time format

See PHP date documentation for available formats