OK I know how to display another nodes $node->body on my current node. But how do display another node's $node->links on my node? In place of the $links that would have normally been there?

Comments

nevets’s picture

Borrowing code from node.module, to get the links you need something like

<?php
  $nid = 1;  // You probably already have the nid

    $links = module_invoke_all('link', 'node', $node, !$page);

    foreach (module_implements('link_alter') AS $module) {
      $function = $module .'_link_alter';
      $function($node, $links);
    }
?>

How/where you replace the nodes links would depend on the details of when you want to do this and where the other nodes nid comes from. For example if this for only some content type, say 'replaced_links' you could do this in the template file node-replace_links.tpl.php (replacing replace_links with your content type).

Rotwang’s picture

Can I do this on taxonomy index pages only? Or can I only make it specific by content types...

nevets’s picture

To provide more detail would require a better understanding of what you want to achieve.