I'm trying to get a block that will just show the image galleries as links.

For example:

My dogs pics
My cat pics
My children

But when I grab from image gallery I get all the extra info like how many pictures are in the gallery and such. I just want a link to each gallery.

Can someone help me?

Comments

techczech’s picture

I think the easiest solution would be to use the views module to set up your own block. That way, you should have complete control over what gets displayed. http://drupal.org/project/views Otherwise, you might have to look around for a PHP snippet.

neoliminal’s picture

I want to list just the gallery links in a block. the PHP snippets have been helpful but I haven't found the solution. The closest I get is adding this to image.gallery:

function image_gallery_list($type = NULL, $tid = 0) {
  $galleries = taxonomy_get_tree(_image_gallery_get_vid(), $tid, -1, 1);
  for ($i=0; $i < count($galleries); $i++) {
    $galleries[$i]->count = taxonomy_term_count_nodes($galleries[$i]->tid, 'image');
    $tree = taxonomy_get_tree(_image_gallery_get_vid(), $galleries[$i]->tid, -1);
    $descendant_tids = array_merge(array($galleries[$i]->tid), array_map('_taxonomy_get_tid_from_term', $tree));
    $last = db_fetch_object(db_query_range(db_rewrite_sql('SELECT n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid $
    $galleries[$i]->latest = node_load(array('nid' => $last->nid));
  }
  $content = theme('links', $galleries);
  return $content;
}

But that gives me too much content back. I just want the links.

sepeck’s picture

Otherwise you'll have to refine a php snippet.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide