I'm sorry if this was mentioned before but I couldn't find it. How do you set the contextual filter to be empty if it's not given? I.e. I have a bunch of nodes that are structured with "parents" via node references. To allow the user to find the content in the admin I created a view that I want to list all the nodes with no parents if there is no argument given and then if an argument is given list the nodes with the parent in the argument. On the normal filter list I can add the node reference field and say "is empty". But on the contextual filter I can add the node reference but I can only have it show all if no argument is given. I tried 0, null and a blank array via the php options and got nothing. Is there any way I can do this?
Comment | File | Size | Author |
---|---|---|---|
#1 | default_display_empty.png | 33.39 KB | babusaheb.vikas |
Comments
Comment #1
babusaheb.vikas CreditAttribution: babusaheb.vikas commentedThis problem is related to your contextual filter configuration.
To set the contextual filter result to be empty if it's not given follow the simple steps:---
Also, take a look on attached screenshot for reference.
I hope your problem will fix.
Comment #2
Daemon_Byte CreditAttribution: Daemon_Byte commentedI can't remember exactly what I did to fix it but I did find a way. I will remember this for next time. Thanks for the help
Comment #3
Daemon_Byte CreditAttribution: Daemon_Byte commented