print l($node->title, $node->path);
This appears to work fine for nodes with a path alias set up (via the path or pathauto modules), but not for other nodes, because the $node->path part was empty. I believe the following code should have been used, to always start with the base URL for the node, and let the l() function choose the most appropriate alias:
print l($node->title, 'node/' . $node->nid);
No comments:
Post a Comment