Contextual filters and node types I have a block that is displaying related content to the node being viewed. Currently it's displaying node titles for three content types : hotel, tour operator and transport.
I would like it to display only content type that is similar to the content of the node currently viewed and filter out the two other content types.

I have been trying to set this up using contextual filers in views but I can't get it to work.

Is it something that can be done using contextual filters without writing any code ? Or do I need to write some php (I can't) to get this to do what I need.

Thanks
It might be possible to add a conditional filter on the node type and then add custom PHP code to get the default value based on the currently viewed node. The code to do this should look like this: (should work both in D6 and D7):

if ($node = menu_get_object()) {
  return $node-&gt;type;
}


It would be cleaner to do that in a views handler, that is however quite a bit more complicated to set up than pasting the above code in the textfield in the views UI.