Hello all,

First and foremost.. amazing work on this module. This is exactly what I've needed, and unfortunately didn't find it in time to save hours and hours of work arounds for Drupals context issues. I know now though, right?

I have an issue though, and this may end up being a feature request to include taxonomy vocabularies to be part of a context.. but I have several "taxonomy/term" views set up to display nodes by certain parameters ie: (Newest First, Oldest First, Lowest Price, Highest Price).. I have set all of those created views to my context, but the primary menu link (set in the context) doesn't stay highlighted. The Context it self appears to work, because the blocks I have set appear on these views. It's just the menu indication that doesn't seem to be plugging in.

Any ideas? If you need any more information from me, let me know. I'd love to get this working, it would solve all of my current woes with Drupal. :)
Thank you,

Comments

yhahn’s picture

Thanks XBleed, it's good to hear the ideas in context make sense : )

About the menu active class, my biggest suggestion would be to move to Drupal 6 : ) The menu active class hilighting is much more stable in the D6 version and the changes in the theme + menu system are allowing us to make sure it works out of the box with most themes, including Garland. Also there are a lot of nice features and optimizations in the D6 version that haven't been backported to D5 yet.

If for whatever circumstances you are locked into D5, here are some troubleshooting questions/possible things to look at:

  1. Does the context-based menu active class not work anywhere at all or just on your taxonomy/term pages?
  2. Is the menu item actually marked as active in the HTML source of your pages? In Drupal 5, the default menu building/theming functions will add a class like "menu-123-active" to items in the active menu trail -- which is fairly useless for themers because the CSS definition usually targets just the "active" class. If it's doing the former correctly, you can write an override to theme_links() that will convert a "menu-$mid-active" class to just "active".

Let me know and I'll see what I can do to help.

yhahn’s picture

Assigned: Unassigned » yhahn
XBleed’s picture

Unfortunately, I am held back to Drupal 5. From what I have read, in D6 the menu is finally working in a senseful manner, but I have to rely on quite a bit of modules that have not yet been ported, and some important ones do not have an alternative available. :/

It appears that the menu highlight is working on other aspects of Context. As I stated earlier, I had not found out about Context until after spending hours trying to fix this issue on my own, but I tried to remove all of my customizations and I'm pretty confident that I got them all. Menu highlight is working on nodes, node/add/****, node/*/edit, etc. So I presume that it's just the views taxonomy/term pages.

I have the menu overwritten to use active class as well as menu-$mid-active, but I double checked and when on a taxonomy/term page, the "active" class doesn't get assigned either on its' own, or as menu-$mid-active. It just gets menu-$mid.

I hope that helps. Thanks for the help and assistance. :)

XBleed’s picture

I think I can help shed a little more light on this issue:
I don't know if it's good news or bad news, but it doesn't seem to keep context for any view at all, not just taxonomy/term views.

I took the easy way out with my menu. I am doing a replace to add the "active" class..

print str_replace('-active"', '-active active"', theme('links', $primary_links, array('class' => 'menu-primary clear-block')));

So it takes ALL menu items with "menu-$mid-active" class and it then becomes "menu-$mid-active active". Easy way to get active on the li element as well as the a element. So in order for the active link to get assigned at all, it obviously needed to have the "menu-$mid-active" class assigned to it previously. This part works. Drupal assigns menu-$mid-active, where it's supposed to, and Context now tells Drupal to associate things together.. (when in a certain node type, highlight the menu, etc.)

Well, on a view.. the "menu-$mid-active" never gets assigned to the Menu item.. I have tried this out on a clean install of Drupal 5.14, and with just Views/Context modules installed and I'm getting the same result. Views don't seem to belong to the set Context.

I wish I could help more, I'm not that great of a debugger. :/

yhahn’s picture

Hey XBleed,

This is all very helpful information. I'll take a look at it this upcoming weekend (Dec 20th or so) -- in the meantime, if there is a dev or staging site you wouldn't mind giving me access to, feel free to send it to me via contact form. If not, I'll do the best I can : )

paulocs’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing all issues from 5.x.* as it is not supported anymore.

If you need it in the supported versions, please open a new issue.