Closed (works as designed)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2008 at 17:45 UTC
Updated:
25 Jan 2008 at 20:09 UTC
Comments
Comment #1
merlinofchaos commentedThis isn't a problem of Views, it's a problem of Drupal's menu system.
By default, Drupal keeps primary links active based mostly upon the URL. There are other ways that are all hardcoded, but in general, what you want is the URL.
So if you have a section named 'cats' and several nodes in that section, you generally accomplish some form of hierarchy by aliasing the nodes to cats/persian, cats/siamese, cats/howly-mad-mean-old-tom
This is a part of Drupal that is very difficult to do properly. I have a blog post about the subject you can find if you google search for the phrase "menu_set_location can eat my shorts" -- which should be enough to tell you that this is a difficult task.
It's also not something Views does or even can do for you.
Comment #2
bjacob commentedThanks for you fast reply. I've set up pathauto in order to get hierarchical urls like the following ones:
content-type_1/node_1
content-type_1/node_1/content-type_2/node_2
content-type_1/node_1/content-type_3/node_3.
Furthermore my view1 is called content-type_1 and I thought Drupal would figure it out and display the menu items as active. The main problem is that I'm building a website where users can create new nodes of the content types _1, _2 and 3. Therefore I've to find a solution which offers me the dynamic I need.
At first I thought maybe it's a problem with my views and the built-in function to create menus...
Can I achieve what I need with the post on your blog?
Comment #3
merlinofchaos commentedWell. The core principle I use in that post...yes. But I don't think I explain it very well. I recommend you turn to the forums, though; there are people who've tackled this problem and beaten it. It takes work and it's an ugly place to work in (Drupal's menu code is...well, it was rewritten from scratch for D6. That's how it is =)