0
votes

I am using views 3 and drupal 7. I have a view setup where it will return all related articles based on the keywords which works perfectly.

The problem is that I don't want the article that I'm on to show up in the results. Is there a way to hide specific nodes from displaying? For instance, lets say I have nodes: 43908 and 43909 that I don't want to show up in the view.

I've added a filter criteria (not contextual filter) to remove these nodes, but is it possible to combine node ID's into one filter? So if I wanted to show all but 43908 and 43909 how would I do that? I've tried to add them as 43908+43909 but that didn't seem to work.

2

2 Answers

0
votes

You can use the regular expression option for the nid filter. So for the nid you mention you would do:

[^43908|^43909]

This filters out nodes with nid 43908 and 43909.

As for the scenario you describe, I think a better approach would be to add a separate field to your content type, e.g. field_in_progress, a tick box only visible when editing. Then you can add a filter on that field for the view.

0
votes

This article may help. It involves excluding the current node from a list view.