Displaying a block on a content profile page passing the content profile nid into the block I have a view block. It takes an argument to filter the content. The argument is the nid of a content profile. I then use a relationship to get the uid of the content profile. This uid means I only returns nodes related to the user of the content profile.

I wish to display this block on the users content profile page. So there would be a block listing nodes from the same user on there content profile. I am displaying the block using context.

What is the best way to get the filtering to occur. I currently am passing an argument which gets the nid of the content profile from the url. I have been told that I can do this by using spaces and contexts and not my custom php. How would you do this>
Add an argument of type Node[nid] to your views

Configure Action to take if argument is not present for Provide default argument as PHP Code

Add following code in the text area

  $node = node_load((int)arg(1));
  return $node-&gt;uid;