How to get the path to a node I'm using a view template to override how a field is displayed.

I want to include a link to the node in the field.

Given a node, how do I get the URL (relative is fine) for a node?

I've got the node in the overridden template, but not sure where to go from there:

$node = node_load($row-&gt;{$field-&gt;field_alias});
$wrapper = entity_metadata_wrapper('node', $node);

$path_to_node = ???

?&gt;&lt;a href="&lt;?php print $path_to_node ?&gt;"&gt;Go to Node&lt;/a&gt;
You don't need entity_metadata_wrapper in this case.
You can get path of node using url() function.

$node = node_load($row-&gt;{$field-&gt;field_alias}); 
$nid = $node-&gt;nid; 
$path_to_node = url("node/$nid");


And I agree with Елин Й's answer. You can use l() function. It already uses url() function. So you can build link with node pathauto alias using:

$node = node_load($row-&gt;{$field-&gt;field_alias}); 
print l(t('Go to Node'), 'node/' . $node-&gt;nid);