Skip to main content
1 of 2
Jimajamma
  • 17.1k
  • 1
  • 28
  • 35

What @clive has mentioned is great if you want to use /user for this, but from a number of angles, I really don't like using it at all for this kind of thing. I would like to say mostly from a style perspective, but actually more from a linking perspective, eg, an email or post that includes check out my cool profile on mototribe: www.mototribe.com/user bollixes things up.

So, when I've done stuff like this, I include php logic in my block view along the lines of:

$global $user;
$block=array();
$node=menu_get_object();

if ($node->type==THENODETYPEWEARELOOKINGFOR && $node->uid==$user->uid) {
  // generate the block here
} else {
  // don't generate anything (or put something else in it's place)
}

return $block;

so the block is only generated when the currently logged in user looks at a certain node type that s/he owns. Obviously I've not fleshed out all the isset()s or empty()s needed in prime time for the above but I am sure you get the jist.

Of course, I could also be talking total smack here if D7 user profiles aren't nodes, but this works great in D6 with content profiles :)

Jimajamma
  • 17.1k
  • 1
  • 28
  • 35