howdy!

is there any way to tell in node.tpl.php whether or not the node is being displayed in a node reference field instead of as a stand-alone node?

currently, when node.tpl.php is invoked to display a node reference, $page == 0, even if the display is set to "full node".

for the default node.tpl.php this isn't a big deal - the only difference when $page == 0 is that the title is printed.

but my template override/use case has very different presentations of teaser and full node, and i was surprised that the "full node" display had $page set to 0.

generically, it would be nice to know if i'm being invoked from a node reference to allow for different logic for full node, teaser, and node-reference in node.tpl.php.

Comments

firebus’s picture

Title: node template for a node reference » how can i tell in node.tpl.php if i'm rendering a node reference?
Assigned: Unassigned » firebus
Status: Active » Fixed

aha, i can use $referencing_node.

thanks for listening!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.