Community & Support

Outputing $links in page.tpl.php instead of node

I have a zen based theme.
I'd like to move the $links variable output from the bottom of the node to the same place as the primary links.
Adding print $links in page.tpl.php doesn't have any effect however.

I tried figuring out from where $links came in the first place, but failed.
What part of Drupal do I need to understand to understand this behaviour and how to best accomplish my goal?

Comments

$links is for node.tpl.php

$links is for node.tpl.php because is specific for each node. It is cooked in the "node module" in the core

It's not in page.tpl.php because it doesn't have so much sense to have it there..a page can contain multiple nodes.

You can create a specific template only when a page is showing 1 node with page-node.tpl.php
http://drupal.org/node/190815#template-suggestions

And then in page.tpl.php or page-node.tpl.php you can access to the links with $node->links

Thank you very much, I

Thank you very much, I appreciate you taking the time to share this :)
I'm gonna try it :)