0
votes

I have a Contextual filter: Content: Nid in Views3 that I want to return the TNID instead of the NID When the filter value is NOT available.

I tried

$node=node_load($argument);
$argument = $node->tnid;
return $argument; 

or

$node=node_load(arg(1));
$argument = $node->tnid; // bzw. $argument(1) = $node->tnid;
return $argument; 

and others from inside the Provide default value:PHP Code Field. Nothing worked.

1

1 Answers

0
votes

solved the problem by adding this code to the page.tpl.php

$imagemenuview = views_get_view('projectimagemenu');
echo $imagemenuview->preview('block', array($node->tnid));

but still interested in the solution using Contextual filter: Content: Nid returning the TNID instead of the NID When the filter value is NOT available