I've got a node reference which I am setting as a relationship in a view. I am then creating a link to the node using the relationship.

When I set the link to hide when empty it doesn't, I get a path of /node

I've tried various other methods like rewriting the aliased path, but again that seems to give me /node. If I just use nid that works but I get ugly link paths.

I also found a previous post suggesting using a theme template to re-write the title part of the standard node reference link. Unfortunately this was for D5 and couldn't get to work in D6 (http://drupal.org/node/97373)

Please help - I just want the link to disappear if there if no node specified in the node reference :-(

Comments

timdiacon’s picture

sorry for bump but really? no one can help on this?

Anonymous’s picture

Getting the same error.

Using a node reference field in the relationship, then (Relationship) Node: Link in the field. It doesn't not hide the link when empty. When I'm using (Relationship) Node: Nid, it works fine.

Edit: Temporary work around: Using Views Custom Field. Add a PHP field and add:

$temp_nid = $data->{$this->view->field['nid']->field_alias};
if (isset($temp_nid)) {
	echo '<a href="' . $data->{$this->view->field['path']->field_alias} . '">Description</a>';
}