views:

49

answers:

3

I'd like to manually specify a view to show certain nodes.

I can add a Node id filter (e.g. display if node id = 50), but I can make a multiple filters becomes they are "AND"'d (e.g. display if node id = 50 AND node = 51).

I'd prefer to not have to use taxonomy or whatever, as Im not currently using this. It would be easier to just manually code the view output if thats the case.

+1  A: 

You got some options.

  • If the nodes are in range, fx nids 50, 51, 52, 53, then you can use between/range option in the filter.
  • If it's random nodes fx nids: 3, 50, 340, it's a bit more difficult, as the views UI doesn't allow OR queries. You can either, use the views OR module Note it's still in dev version or you can create the query yourself with hook_views_query_alter
googletorp
+1  A: 

You can use Views 3 (currently in alpha3 and quite stable). It supports OR out of the box.

But are you dynamically passing the Node Id's via an argument? If not then why don't you consider using Nodequeue module? It will allow you to precisely specify what nodes should be shown.

Nodequeue works well in Views 2 and Views 3.

Sid NoParrots
+4  A: 

What Googletorp says, but there is one more option: You can add an argument for Node:Nid, choose 'Provide default argument' - 'Fixed entry', enter the node ids separated with commas under "Default argument" and check the "Allow multiple terms per argument." box.

Note that this will leave the option open to smart users to specify other node id's in the url, thus changing the output of the view.

marcvangend
Arrghhh! I should of looked a bit closer. Nice one.
Ashley Coolman