Cound anyone please tell me how to display node links in a block?
I have figured out 1 solution but I don't think this is a good one.
What I have done:
- Add a block, and use PHP snipet and put the following code:

<?php
if ( (arg(0)=='node') && is_numeric(arg(1)) ) {
$node = node_load(arg(1));

$links = module_invoke_all('link', 'node', $node, FALSE);
print theme('links', $links, array('class' => 'links'));
}
?>

Comments

stevenc’s picture

A block has no direct relationship to a node.

If you are doing this so that you can relocate the links elsewhere in your theme (for example, moving a node's links into a sidebar) this is better accomplished by creating a custom TPL file for your node type.

If you mention your real goal, it might be easier to suggest another approach.

---------------------------------
Steven Wright

Slalom