drupalfun.com
cannot create related content in views
try to create related content as mentioned in the "Drupal 6 - Ultimate Community Site Guide", I follows all the steps as instructed, and the PHP code in Views argument are as follows:
$node = node_load(arg(1));
if ($node && $node->taxonomy) {
foreach($node->taxonomy as $term)
{$terms[] = $term->tid;}
return implode(’+’ , $terms);
} else { return; }
However, it did not work, as views seems that it did not triigger this PHP code at all. It should be quite straightforward, what else could be wrong....please advise
Related Questions
Responses
2. same here... in the argument
same here...
in the argument config page there is no input format option. we chose php code above in the radio button.
3. solved
I saw what the problem was...
it was the quotes ’ from the pdf file.
I changed it to ' and it's ok now
$node = node_load(arg(1));
if ($node && $node->taxonomy) {
foreach($node->taxonomy as $term)
{$terms[] = $term->tid;}
return implode('+' , $terms);
} else { return; }


1. Hi, Did you put the input
Hi,
Did you put the input format on "php code"? (below the text box)