When a user is forwarded to a A/B/N Variation they can still click any links in a menu to the original and be consistently forwarded to the same variation which is great. The problem is Drupal doesn't know what the variation should still have the same active menu or menu trail.

This can be as little as a top level menu item like "Home" not being styled as as selected because it's missing it's .active class - to - a whole sub menu not appearing.

I might be able to do some development resources towards fixing this but first wanted to find out how other people are dealing with the problem or any suggestions on how a solution could work.

Comments

JoeMcGuire’s picture

I've attached a patch which updates the menu item on variant pages. This allows the menu tree to remain open like it would on the orgional page and also for links to receive their active class. Google's Javascript then takes care of redirecting the user to the correct variant after any link to the original is used.

JoeMcGuire’s picture

Status: Active » Needs review
jeffwidman’s picture

sub

yannisc’s picture

Status: Needs review » Needs work

I applied the patch and uploaded to my website, but I get:

Notice: Undefined variable: tab_root_map at _menu_translate() (line 772 of /includes/menu.inc).
Warning: implode() [function.implode]: Invalid arguments passed at _menu_translate() (line 772 of/includes/menu.inc).
Notice: Undefined variable: tab_parent_map at _menu_translate() (line 773 of /includes/menu.inc).
Warning: implode() [function.implode]: Invalid arguments passed at _menu_translate() (line 773 of /includes/menu.inc).

yannisc’s picture

Status: Needs work » Needs review
Schoonzie’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

GWO is no longer around. Closing old issues.