Active
Project:
Menu Node Views
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Feb 2013 at 18:53 UTC
Updated:
15 Nov 2018 at 14:48 UTC
Jump to comment: Most recent
Comments
Comment #1
kumkum29 commentedSolution :
I choose a contextual filter with "Parent menu link id" + custom php code + code :
Comment #3
brightboldThanks @kumkum29, you're a lifesaver.
Comment #4
brightboldRats. Spoke too soon. It worked in the view preview but on the page I get
Notice: Undefined offset: 4 in eval() (line 2 of /sites/all/modules/contrib/views/plugins/views_plugin_argument_default_php.inc(53) : eval()'d code).I was trying this because something broke my level 4+ Menu Blocks, and I think whatever that was is breaking this too.Comment #5
gabriel.achille commentedchanged the status because this is not fixed for the module.
There is currently no predefined view relationship in the module to handle this particular situation.
Anyone interested if i'm working on that ? (adding relationship "Menu: Sibling menu" or "Menu: Children menu" similar to "Parent menu link id"...)
The other way seems to do something similar to #1...
Comment #6
kruser commentedTo modify the code in #1 to work with any level in the menu, I modified it to the following:
Comment #7
kumkum29 commentedComment #8
brightboldStill not the correct status. It's not fixed for the module, so it shouldn't be "fixed," and there's no patch supplied so it shouldn't be "needs work."
Comment #9
marco van bemmel commentedHi BrightBold,
I tried
- contextual filter with 'Parent menu link id',
- select 'Provide default value'
- than select 'custom php code'
- enter code of #6
After this i entered a new contextual filter:
- contextual filter 'Menu: depth'
- select 'Provide default value'
- than select 'Fixed value'
- enter the level (in my case 3)
If needed you can add a third contextual filter to exclude the current NID.
Hopefully this will help. It works very well with my situation.
Good luck!
Comment #10
brightboldThanks @TDDF. If I can remember which site I was working on two years ago that was having this problem, I will give your solution a try. :)
Comment #11
henrik23 commented@BrightBold: Superb, it works! Find your old project and use this solution!
@Marco van Bemmel, @kruser and @kumkum29: Thank you for your work. Using this solution I can now list all the sibling nodes like I wanted to do for two years but could not manage without this clou.