Let's say you've got a block that you don't want to display when the node you are viewing has been promoted to the front page.
Here's how to do it:
- On the block configuration page, there is a section entitled Page specific visibility settings
- Select Show if the following PHP code returns TRUE (PHP-mode, experts only).
In the Pages text box enter the following code:
$nid));
if ($node->promote != 1){
return TRUE;
}else{
return FALSE;
}
?>
- Save the block and then try it out.
You should see that when you are looking at node that has been promoted, the block will not be displayed.
Other solutions on the web suggest using arg(1), but this won't work if you are using URL aliases. The above solution works in ALL instances.



