Hello,
My case is as following:
- I have two content types: A and B
- With content type A, I want its dependent information to be appeared as menu tab by using views module to create a page display view. Then I set the path and menu attributes to suitable values. (ex: path: node/%/viewresult; menu: I select menu tab). Everything works fine as expected.
- However, the menu tab also appears on any node type B that I don't want.
Could someone help me solve this. I want menu tab created by page display view to be appeared on specific content types I want, not all content types.
Thank you,
Nguyen Quoc Viet
Comments
Comment #1
dawehnerthis cannot be done by views.
try out panels, this will solve your problem
Comment #2
merlinofchaos commentedAdd a validator to your argument that restricts it to node types. THis will get run when the menu system is checking for tab visibility.
Comment #3
nguyenquocviet commentedThanks merlinofchaos,
Your instruction is really, really helpful, this helps me resolve a lot of issues. I got it !
By the way, in the area of Arguments --> Action to take if argument is not present, the option of Provide default argument gives several Default argument types that I dont really understand them. Could you please give some links that have documents or expamles of using them.
I have become aware better and better of module views's power.
Once again, thank you.
Nguyen Quoc Viet
Comment #5
Phil Wolstenholme commentedI'm having trouble achieving this set up, despite experimenting with arguments. I was wondering if someone could help me?
My set up is explained in this thread: http://drupal.org/node/511700 and below is my view code (I know the calendar aspect isn't functioning properly, nodes aren't displayed, but I just want to get the tab showing up in the right place first).
Thank you!
Comment #6
Phil Wolstenholme commentedI'm having trouble achieving this set up, despite experimenting with arguments. I was wondering if someone could help me?
My set up is explained in this thread: http://drupal.org/node/511700 and below is my view code (I know the calendar aspect isn't functioning properly, nodes aren't displayed, but I just want to get the tab showing up in the right place first).
Thank you!
Apologies for using < b lockquote> but
and then my views codeorcode(even though it works just for words) made my post appear as a blank one, as shown above.Comment #7
Phil Wolstenholme commentedComment #8
Phil Wolstenholme commentedRight, for anyone else having this query I've figured out how to use arguments to do this - and it's ridiculously simple - I think I was trying too hard when I should have just gone for the easy option.
In your view, click on one of the arguments you have, for example I had a node ID argument. Then under 'Validator options' in the dropdown menu choose Node, then select the type(s) that you want to show the view on. For 'Action to take if argument does not validate:' you might have to select the hide/404 option, but I'm not too sure about that.
Comment #9
tomsm commentedsubscribing