Hello Juan Carlos,

I was wondering if there's a way to have menu active-trail enabled when viewing the images of a GA gallery. At the moment, a GA gallery, when in thumbnail screen works as a normal Drupal node, with all the usual menu active-trail attributes - meaning that all active menu links are displayed with HTML attribute class="active-trail" and can be easily highlighted with CSS styling. But after clicking on a thumbnail and go into the particular image view, we lose the active-trail information. As I understand, this happens because the images are GA nodes (node/x/y), which is some kind of custom node, not a normal Drupal node and Drupal menu system cannot follow the path.

So, to clarify, my question is: When viewing an image, is there a way to have "active-trail" or some other attribute that will allow highlighting of the same menu objects that are highlighted when viewing the thumbnails of the GA gallery that the image belongs to? (pheww... hope you understand what I mean) :)

Thanks again for all the work you've put into this module!

CommentFileSizeAuthor
#3 gallery_assist_test_menu_trail.tar_.gz246.22 KBjcmc

Comments

zirafi’s picture

Hi,

Are you referring same requirement as in this issue

http://drupal.org/node/756968#comment-2861668

thanks

Johnny Rambo’s picture

Hi,

Yes, I suppose it's something similar, but not quite the same.

I hope I'm wrong about this, but I don't expect that there is a way to have a full menu-driven gallery with GA, as the images are not nodes. From what I understand, only the gallery is a node. Therefore I am only hoping to find a way of displaying the individual image views together with the menu trail of the gallery node. In other words, to have Drupal handle the menu trails of node/1/1 just like node/1.

I'm not sure this is even possible to do with GA code, maybe it's something that has to do with menu code.

Just trying to find out... :)

jcmc’s picture

StatusFileSize
new246.22 KB

Hello Johnny Rambo,

please review this first attempt to satisfy your request.

Regards
Juan Carlos

jcmc’s picture

Status: Active » Needs review
zirafi’s picture

Looking forward to see the result of new module file configuration.

Anonymous’s picture

hi,
i was not able to try the code you gave jcmc
meanwhile i modified my template (basic) to do it
I'm a newby so i might not do the things correctly but i wish it can help :)
thanks for gallery assist btw.

<?php
    $expl_uri = explode('/', request_uri() );
    $req_1 = explode('=', $expl_uri[1]);
    if ( $req_1[1] == "gallery"  ){
        print_r(arg()) ;
        $args = arg();
        menu_set_active_item($req_1[1]);
        foreach ( menu_secondary_links() as $sec_links  ) {
            if ( preg_match ( "|^".$args[0]."/".$args[1]."|", $sec_links['href'] ))
            {
                $secondary_links = menu_secondary_links();
                menu_set_active_trail($req_1[1]."/".$expl_uri[2]);                                                                                            
                menu_set_active_menu_name($req_1[1]."/".$expl_uri[2]);
                menu_set_active_item( $sec_links['href']);
                break;
            }
        }
        }
    ?>
zirafi’s picture

Hi kerute,

Do you mind to share the site where this is implemented so that I would like to look at it and try to apply on my site.

Thanks

Anonymous’s picture

Hi,
the site is not up for now, but as soon as it is ill let you know
thanks and sorry for the late reply

zirafi’s picture

Hi,

Could someone share the procedure on how to achieve menu driven Gallery.

thanks

Anonymous’s picture

Paradesi, you can see my solution implemented on belfo.ca.
The site it not nearly finished, but galleries menus work as I needed.