{# # Copyright 2006 - 2016 TubePress LLC (http://tubepress.com) # # This file is part of TubePress (http://tubepress.com) # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. #} {# # Non-exhaustive list of variables in this template (add-ons may add other variables). # # mediaItem tubepress_api_media_MediaItem The item to display. # # attributesToShow string[] Media item attribute names that the user has requested to display # for each item in $mediaPage->getItems(). # # attributeLabels array An associative array of media item attribute names (strings) to # untranslated labels. e.g. 'timePublishedFormatted' => # 'Date posted'. The array values will be shown to the user. # # embeddedSource string A string containing the HTML for the embedded media player. # # embeddedWidthPx int An integer representing the requested embedded media player # width (in pixels). #} {# #
# # The outer-most
for a single TubePress media item. #}
{% if mediaItem is not defined %} {% block noItemFound %}

{{ 'Item not found'|trans }} {# >(translatable)< #}

{% endblock %}{# end block "noItemFound" #} {% else %} {% block itemFound %} {# The following block prints out the media item's title, if requested. #} {% if 'title' in attributesToShow %} {% block singleItemTitle %}
{{- mediaItem.title -}}
{% endblock %}{# end block "singleItemTitle" #} {% endif %} {# # The following statement prints out any HTML required for the TubePress embedded media player. We do not recommend removing # this statement, though you may move it around the template if you'd like. #} {{ embeddedSource|raw }} {% block meta %} {# #
# # This
wraps each video's metadata (title, duration, etc). #}
{# Loop over the attributes for this media item. #} {% for attributeName in attributesToShow if attributeName != 'title' %} {# The logic for printing the dd/dt pairs is delegated a fragment since it is shared with single_video.html.twig. #} {% include 'single/fragments/dt_dd_pair.html.twig' %} {% endfor %}
{# end of dl.tubepress-meta-group #} {% endblock %}{# end block "meta" #} {% endblock %}{# end block "itemFound #} {% endif %}{# end of top-level if/else block #}
{# end of div.tubepress-single-video-outermost #}