You are here

function media_gallery_detail_page in Media Gallery 7.2

Same name and namespace in other branches
  1. 7 media_gallery.pages.inc \media_gallery_detail_page()

Menu callback; view a single gallery media entity as its own page.

1 string reference to 'media_gallery_detail_page'
media_gallery_menu in ./media_gallery.module
Implements hook_menu().

File

./media_gallery.pages.inc, line 88
Common pages for the Media Gallery module.

Code

function media_gallery_detail_page($gallery_node, $file) {

  // Set the breadcrumb.
  $node_url_arguments = entity_uri('node', $gallery_node);
  drupal_set_breadcrumb(array(
    l(t('Home'), NULL),
    l($gallery_node->title, $node_url_arguments['path'], $node_url_arguments['options']),
  ));

  // Set the title for the page
  $title = _media_gallery_get_media_title($file);
  drupal_set_title($title);
  drupal_add_js(drupal_get_path('module', 'media_gallery') . '/media_gallery.js');
  $return = media_gallery_item_view($gallery_node, $file, 'media_gallery_detail');
  return $return;
}