function node_gallery_get_image_navigator in Node Gallery 6.3
Same name and namespace in other branches
- 6.2 node_gallery.inc \node_gallery_get_image_navigator()
Builds an array with the data necessary to navigate a gallery.
Parameters
$gid: The nid of the gallery to navigate within.
$nid: The nid of the current image.
$reset: (optional) boolean when set to true, clears the caches.
Return value
An associative array consisting of:
- total: The count of published images in the gallery.
- parent: The nid of the gallery.
- current: The nid of the current image.
- prev_nid: The nid of the previous image.
- next_nid: The nid of the next image.
- first_nid: The nid of the first image in the gallery.
- last_nid: The nid of the last image in the gallery.
2 calls to node_gallery_get_image_navigator()
- node_gallery_views_handler_image_navigator::render in views2inc/
node_gallery_views_handler_image_navigator.inc - _node_gallery_image_view in ./
node_gallery.module - Attaches the image navigator to the image node's content.
File
- ./
node_gallery.inc, line 532 - Shared functions for node_gallery
Code
function node_gallery_get_image_navigator($gid, $nid, $reset = FALSE) {
$navigator['total'] = node_gallery_get_image_count($gid, $reset);
$navigator['gallery_nid'] = $gid;
$navigator['current'] = node_gallery_get_image_position($gid, $nid, $reset);
$navigator['prev_nid'] = node_gallery_get_prev_image($gid, $nid, $reset);
$navigator['next_nid'] = node_gallery_get_next_image($gid, $nid, $reset);
$navigator['first_nid'] = node_gallery_get_first_image($gid, $reset);
$navigator['last_nid'] = node_gallery_get_last_image($gid, $reset);
$navigator['image_nids'] = node_gallery_get_image_list($gid, $reset);
return $navigator;
}