I have one panel that I want to override multiple content types with. I would like to have a view that lists based on the content type being viewed. Is there a way to pass the type of node being viewed as an argument to a view?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | context-node-type-444456-6.patch | 803 bytes | duellj |
Comments
Comment #1
gdoteof commentedI was able to solve this by choosing in the view an argument for 'taxonomy:term' and using php code for when an argument wasn't available
Comment #2
merlinofchaos commentedThat's as good a way as any of doing this.
Comment #3
gdoteof commentedhrm, i won't change this back, but is there an inherent reason why only one term can be passed via panels to a view as an argument? it seems to be a valid feature request to send multiple terms
Comment #4
gdoteof commentedwow sorry, I don't know what is going on here. I had another issue where I was trying to pass multiple terms of a specific vocabulary to a view, and that is the code I used. The code doesn't really apply to the intended question, except the general idea of using php to determine the node type.
I just looked at the code and then at your response and made mine without looking at the original question.
Comment #5
duellj commentedChanging this back to "active" since the code posted by gdoteof doesn't pertain to the original issue.
Comment #6
duellj commentedHere's a patch for adding in the node type as a context for ctools. It's pretty basic, but it works for passing the node type as an argument to a view.
Comment #7
merlinofchaos commentedWith the current system, the appropriate way would be to make a type converter so that the type can be pulled as a string. This is trivial to do, so I did it.