3

For instance: if you have a view that produces a list of titles of nodes of content type X, how can you make that list exclude the node that is currently displayed to a site visitor?

4

This can be done with a regular argument.

Create an argument for Node -> ID, choose Node as the validator and Node ID as the argument type. Then just tick the Exclude the argument check box. You can also choose specific node types here if you want.

Used with a block, this will list all nodes that aren't the one currently being viewed. You can then filter it further to suit your needs.

  • Thanks this is what I was looking for. Does one need to provide a default argument with this set up? – Jay Mar 3 '11 at 13:10
  • Totally up to you. Since the only time there won't be an argument is when there isn't a node I'd go with either Display all values or Hide view, depending on whether you want it to show up everywhere or just when viewing nodes. – Paul Jones Mar 3 '11 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.