Hi-

I am trying to figure out the best way to oragnize my Gallery 2 by catergories. I have thought about using the custom fields in Gallery2 and then calling those from Drupal, but I think the quickest would be to use the Gallery2 keyword albums.

I was hacking at the taxonomy menu module and figured out a way to display keyword albums using Drupal's taxonomy:

taxonomy_menu:

  $access = user_access('access content');

    foreach (taxonomy_get_vocabularies() as $vocabulary) {
      if (variable_get('taxonomy_menu_show_'. $vocabulary->vid, 1)) {
        $path = 'taxonomy_menu/'. $vocabulary->vid;
        $items[] = array('path' => $path, 'title' => t($vocabulary->name),
          'callback' => 'taxonomy_menu_page', 'access' => $access,
          'weight' => $vocabulary->weight);

I changed that to:

$access = user_access('access content');

foreach (taxonomy_get_vocabularies() as $vocabulary) {
      if (variable_get('g2Keyword_menu_show_'. $vocabulary->vid, 1)) {
        $path = 'http://localhost/main/?q=gallery&g2_view=keyalbum.KeywordAlbum&g2_keyword='. $vocabulary->name;
        $items[] = array('path' => $path, 'title' => t($vocabulary->name),
          'callback' => 'g2Keyword_menu_page', 'access' => $access,
          'weight' => $vocabulary->weight);

This makes it so that I can set up g2keyword menu items to display gallery2 keyword albums based on drupal taxonomy structure. But I am now completely stuck (very novice at this stuff). The above works for the main category, but doesn't for all subcategories. Also, the menu doesn't expand the way the taxonomy_menu expands when you click on it.

Any help would be great!

Comments

pinxi’s picture

I created an issue for this request here: http://drupal.org/node/142442 and at gallery2 http://codex.gallery2.org/Gallery2:Modules:tags. thanks!