By netron on
i have a block which has
"show if the following PHP code returns TRUE" selected, with this code:
<?
global $node;
if ($node->type=="page")
{
return TRUE;
}
?>
and yet when i visit a page node, the block isnt displayed. is the syntax of the code above correct for Drupal 6.x?
Comments
found it
found the answer here:
http://drupal.org/node/64135
"Show block only for specific content type" example.
Hi
Hi,
Go to block configure page,
In block specific settings...
Write the PHP code and the select the PHP code on select box
For ex this site url http://localhost/drupal/
If(arg(0)==drupal)
return true;
else
return false;
It's working fine..
Thanks,
Raj