Hello,
I haven't been able to figure out to do this yet, maybe it's not possible and this is a feature request? I'm not sure.
Right now when you add a Node > NID filter in a View you have the following options
Is less than, Is less than or equal to, Is equal to, Is not equal to, Is greater than or equal to, Is greater than, Is between, Is not between.
I tried selecting "Is equal to" and typing 111, 242, 391 in the Value box. I also tried separating NIDs with +. Views will only take the first NID value and filter off of that.
Is there a way to have a filter for NIDs similar to the "Is one of" option on the taxonomy term filter?
Thanks for reading!
-Tim
Comments
Comment #1
merlinofchaos commentedIt is only possible to filter for multiple nids when using an argument.
Comment #3
Sinan Erdem commentedIf anyone needs to use multiple nid's for filtering, I have done it like this:
Instead of nid filter, I added an argument Node:nid.
Provide default argument: Fixed entry
Add the nids with plus. For example: 1+3+5
Checked: Allow multiple terms per argument.
Now it only shows nodes 1, 3 and 5...
Comment #4
agnez commentedHey etcetera9,
nice that you posted the solution here after such a long time. It was just the information I needed.
Could you also tell how to obtain "Is not one of" ? I tried !1+3+5 and !1+!3+!5 but that didn't do the trick...
cheers
ag
Comment #5
Sinan Erdem commentedI don't think exclamation mark (!) works on these. Instead you can try selecting the option "Exclude the argument" at the bottom of the argument settings.
Comment #6
agnez commentedyes that works, thanks
Comment #7
drupaluser_test commentedHi,
I am using drupal 7. In my views block I have 100 contents. In that 100 contents I want to display only 10 contents. I have to select that 10 contents. I can not add multiple nid in filter criteria. How can I add more than one nid in content:nid filter criteria?
Do you have any Idea?
Comment #8
Sinan Erdem commentedLook at comment #3.
Comment #9
mandus.cz commentedThis does not work on the exposed filter. Does Anyone know a solution to this?
Comment #10
dr.osd commentedIn the views 7.x-3.7 it is easy: you can add multiplie nid filter and then combine them to group with "or" or "and" operator.
Comment #11
web226 commentedThanks, as per comments #3 and #5, using arguments to filter out specific nid's worked for me on
Comment #12
icf-vpathak commentedComment #3 worked!!
Thank you