Hi!
I have a views page that reads an argument from the url.
e.g. http://www.mydomain.com/myviewspage/4
I put the argument into the menue link path. So I can have one view and create a menue item that alters the view result. But when I do this the menue gets no active trail any more.
eg. Menue path = /myviewspage -> active path is set -> the complete view is shown
Menue path = /myviewspage/4 -> active path is gone -> the view works like expected
Is this a bug or can this just not be done by design of the menue system?
Regards
Marcus
Comments
Comment #1
mordonez commentedI've the same problem
Comment #2
hansrossel commentedBetter ask this in the views issue queue
Comment #3
merlinofchaos commentedCore should be handling the active trail here. This may be a bug in the menu system. Moving back to core queue.
Comment #4
kip stanning commentedactive trail issue also applies to drupal 6. i am using acquia marina in d6. unfortunately drupal stops reading the active trail at the first forward slash after the base url.
subscribe
karl
Comment #5
kla2t commentedsubscribe
Comment #6
marcusx commentedI didn't use a placeholder "%" in my path because my view was working also without it, because I only had one argument at the end of the URL. After putting the % at the end of the path it seems to be working. Can someone confirm this?
Comment #7
rjacobs commentedYes, adding the % in the path settings for the view fixes this for me. I'm guessing that views will default to placing arguments immediately after the entered path, in order, if no argument placement is specified (e.g. it'll treat a path of just "myview" like "myview/%" if one argument is passed). However, it seems that the menu system is only aware that any views arguments should be considered when calculating the active item if those arguments are explicitly defined with a "%" in the view path. All of that is a bit of "under the hood" speculation, but this is what a bit of trial-and-error seems to show.
Comment #8
alan_brown commentedI am in the Similar problem I have attached a Page to a View I want it to take the of Active Menu Item Class, I am using Drupal 7 I am trying this since long time not getting any solution Can some1 tell exactly how it can be possible.
Comment #9
alan_brown commentedFound out just make a menu item and keep it disabled .
Comment #10
dadderley commentedThis is a good find, I am glad that I found this discussion.
My Drupal version is 7.8
I have a similar issue.
When not putting the argument % at the end of the url, the Drupal menu module does not treat menu links (with the view path + the argument) as a real menu item.
If this menu item (with the view path + the argument) was nested in a menu, it does not keep the menu open when the link was clicked.
Putting the % placeholder at the end of the view path makes the menu system aware and solves the problem.
Comment #11
damiankloip commentedSo this is sorted then? wouldn't you always put a placeholder in the views path if you wanted it to have an arg from the url regardless of whether it changes or not.
Comment #12
merlinofchaos commentedNot at the end of a path.
my/path/% is different from my/path but both are valid parents of 'my/path/foo/bar'
Comment #13
damiankloip commentedI see your point :) it should know its parent....