Theming Brightcove fields in Drupal 6

Last updated on
19 May 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

All fields have their own template files that you can use to change their output. The files are based on the formatter used:

  • brightcove-cck-player.tpl.php - Standard video player formatter.
  • brightcove-cck-node-link.tpl.php - An image linking to node.
  • brightcove-cck-node-image.tpl.php - An image, without a link.
  • brightcove-cck-lightbox2.tpl.php - An image linking to Lightbox2 player.

brightcove-cck-player.tpl.php

brightcove-cck-node-link.tpl.php

Template suggestions

Possible suggestions: brightcove-cck-node-link--NODE_TYPE--FIELD_NAME--IMAGE_FIELD.tpl.php, brightcove-cck-node-link--FIELD_NAME--IMAGE_FIELD.tpl.php, brightcove-cck-node-link--IMAGE_FIELD.tpl.php

Examples: brightcove-cck-node-link--story--field_video--videoStillURL.tpl.php, brightcove-cck-node-link--field_video--videoStillURL.tpl.php, brightcove-cck-node-link--videoStillURL.tpl.php, brightcove-cck-node-link.tpl.php

Variables:

<?php
/**
 * @file brightcove-cck-node-link.tpl.php
 * Image linked to node theme implementation.
 *
 * This template is used when viewing a Brightcove video with a thumbnail or videoStill image linking to node.
 *
 * Available variables:
 *   - $output: Formatted image with a link to node, ready for printing.
 *   - $image_field: The name of the image field used from Media API. Can be thumbnailURL or videoStillURL.
 *   - $destination: URL for the Brightcove video player.
 *   - $video_id: Video ID from Media API.
 *   - $field_name: CCK Field name.
 *   - $type_name: Node type.
 *   - $preset: If printed with imagecache, Imagecache preset name.
 *
 * @see theme_brightcove_cck_node_link()
 */
?>

<?php if ($output): ?>
<?php echo $output; ?>
<?php endif; ?>

brightcove-cck-node-image.tpl.php

Template suggestions

Possible suggestions: brightcove-cck-node-image--NODE_TYPE--FIELD_NAME--IMAGE_FIELD.tpl.php, brightcove-cck-node-image--FIELD_NAME--IMAGE_FIELD.tpl.php, brightcove-cck-node-image--IMAGE_FIELD.tpl.php

Examples: brightcove-cck-node-image--story--field_video--videoStillURL.tpl.php, brightcove-cck-node-image--field_video--videoStillURL.tpl.php, brightcove-cck-node-image--videoStillURL.tpl.php

Variables:

<?php
/**
 * @file brightcove-cck-node-image.tpl.php
 * Image linked to node theme implementation.
 *
 * This template is used when viewing a Brightcove video with a thumbnail or videoStill image without a link.
 *
 * Available variables:
 *   - $output: Formatted image, ready for printing.
 *   - $image_field: The name of the image field used from Media API. Can be thumbnailURL or videoStillURL.
 *   - $nid: Node NID.
 *   - $video_id: Video ID from Media API.
 *   - $field_name: CCK Field name.
 *   - $type_name: Node type.
 *
 * @see theme_brightcove_cck_node_image()
 */
?>

<?php if ($output): ?>
<?php echo $output; ?>
<?php endif; ?>

brightcove-cck-lightbox2.tpl.php

Template suggestions

Possible suggestions: brightcove-cck-lightbox2--NODE_TYPE--FIELD_NAME--IMAGE_FIELD.tpl.php, brightcove-cck-lightbox2--FIELD_NAME--IMAGE_FIELD.tpl.php, brightcove-cck-lightbox2--IMAGE_FIELD.tpl.php

Examples: brightcove-cck-lightbox2--story--field_video--videoStillURL.tpl.php, brightcove-cck-lightbox2--field_video--videoStillURL.tpl.php, brightcove-cck-lightbox2--videoStillURL.tpl.php

Variables:

<?php
// $Id$

/**
 * @file brightcove-cck-lightbox2.tpl.php
 * Image -> Lightbox2 player theme implementation.
 *
 * This template is used when viewing a Brightcove video with a thumbnail or videoStill image linking to Lightbox2.
 *
 * Available variables:
 *   - $output: Formatted image with a link to Lightbox2, ready for printing.
 *   - $video_width: Real video width.
 *   - $video_height: Real video height.
 *   - $lightbox2_width: Lightbox2 window width.
 *   - $lightbox2_height: Lightbox2 window height.
 *   - $image_field: The name of the image field used from Media API. Can be thumbnailURL or videoStillURL.
 *   - $destination: URL for the Brightcove video player.
 *   - $video_id: Video ID from Media API.
 *   - $field_name: CCK Field name.
 *   - $type_name: Node type.
 *   - $preset: If printed with imagecache, Imagecache preset name.
 *
 * @see theme_brightcove_cck_lightbox2_player()
 */
?>

<?php if ($output): ?>
<?php echo $output; ?>
<?php endif; ?>

Help improve this page

Page status: No known problems

You can: