Templates

You can set different templates for items managed by HostedVideoAlbums (or HVA).

All changes must be made templates on a new template as the default templates (called Sample) are subject to change with each release. When you create a new template, it is automatically filled with a copy of the default template.

Templates for categories

By default, for the category level, the provided template displays in a bulleted list, for each category, the name of the category and it's description. The name is an hyperlink to the page displaying all the albums of the category. To change this template, go to the Categories Templates tab of the HVA administration page.

Smarty variables for the categories template: $leveltitle, $parentobj (if the parent is specified), $itemlist (table of items), $item->is_selected, $item->nbchildren (if loaded), $item->name, $item->alias, $item->detaillink, $item->detailurl, $item->description, $item->IsDefault, $item->date_modified, $item->date_created, $item->name, $item->alias, $ item->detaillink, $ item->detailurl, $item->description, $ item->IsDefault, $ item->date_modified, $item->date_created

Templates for albums

By default, for the album level, the provided template displays in a bulleted list, for each album of a given category, the name of the album and it's description. The name is an hyperlink to the page displaying all the videos of the album. To change this template, go to the Albums Templates tab of the HVA administration page.

Smarty variables to the template list of albums: $leveltitle, $parentobj (if the parent is specified), $itemlist (table of items), $item->is_selected, $item->nbchildren (if loaded), $item->name, $item->alias, $item->detaillink, $item->detailurl, $item->description, $item->lang, $item->default_width, $item->default_height, $item-> parent_id, $item->parent_alias, $item->parent_name, $item->ParentLink, $item-> parenturl, $item->isdefault, $item->date_modified, $item->date_created

Templates video

At the video level, you can choose between four display modes of video albums: Links List, List Videos, Fancybox and Awkward Showcase.


To edit the templates associated to the basic modes (ListVideos & ListLinks), go to the Videos Templates tab, locate the template to be modified and create a new template.
Smarty variables for the videos lists templates $thumbnail_width, $thumbnail_height, $itemlist (table of items), $item->is_selected, $item->name, $item->alias, $item->detaillink, $item->detailurl, $item->description, $item->site, $item->site_namevalue, $item->videoid, $item->width, $item->height, $item->parent_id, $item->parent_alias, $item->parent_name, $item->parentlink, $item->parenturl, $item->isdefault, $item->fancyurl, $item->>thumbnail, $item->date_modified, $item->date_created

Smarty variables for the "Video detail template used in 'List Links' mode": $leveltitle, $previous_item (if loaded), $next_item (if loaded), $item->name, $item->alias, $item->description, $item->site, $item->site_namevalue, $item->videoid, $item->width, $item->height, $item->parent_id, $item-> parent_alias, $item->parent_name, $item->parentlink, $item->parenturl, $item->isdefault, $item->date_modified, $item->date_created, $ labels->...

You can use the object $labels to display field labels by language ($labels->field_name) and access parent objects using $item->parent_object->parent_object->... (and so on)

To change the template associated with the "Fancybox" (resp. Awkward Showcase) mode, go to the Fancybox (resp. Awkward Showcase) templates tap.
WARNING: in both cases, there are two templates. The first one manages the header that will identify aspects common to all the videos in the page (import + specific javascript code implementation) and the second one handles the inclusion of the list of videos on the page.

Nesting a video in a template

HVA different templates (except Fancybox) use a common videos insertion template called by the {HostedVideoAlbums_embedvideo item=$item}. Parameter item=$item is mandatory. Inside the template associated with this tag (in the Videos Templates tab, this is the "template for video embedding"), you can use the following fields: $leveltitle, $rooturl, $item->name, $item->alias, $item->description, $item->site, $item->site_namevalue, $item->videoid, $item->width, $item->height, $item->lang, $item->parent_id, $item->parent_alias, $item->parent_name, $item->parentlink, $item->parenturl, $item->isdefault, $item->date_modified, $item->date_created, $item->color1, $ item->color2, $ item->scriptaccess, $item->fullscreen, $item->autoplay, $item->fullscreen_int (like fullscreen but 1 instead of true), $item->autoplay_int (as autoplay but 1 instead of true), $labels->...

Templates for thumbnails


Since version 2.4, it is possible to manage the thumbnail template from tab "Videos Templates". In this template, some code smarty3 is used to retrieve the url of the thumbnail for the various sites listed in HVA. If you use a new site, you will need to add code to this template to manage thumbnails if those can be determined dynamically. In cases where the thumbnails are assigned "by hand" to the videos on this site, there is nothing to do.

To insert a video thumbnail in a template, use the tag {HostedVideoAlbums_embedthumbnail width="{$thumbnail_width}" height="{$thumbnail_height}" videoid="{$ item->videoid}" site="{$ item->site_namevalue}" static="{$ item->thumbnail}"}

Breadcrumbs

When you are in a module's template, you can insert breadcrumbs using the {HostedVideoAlbums_breadcrumbs} tag. You can use the same settings as the cmsms standard breadcrumbs tag (initial, delimiter, classid, currentclassid), as well as the parameter "startlevel."
Outside module templates, anywhere on the page, you may call the breadcrumbs action {cms_module module="HostedVideoAlbums" action="breadcrumbs"}, once again using the same parameters.