Return to Snippet

Revision: 7113
at July 7, 2008 10:08 by shrop


Initial Code
<?php
$match = FALSE;
$types = array('story' => 1);
if (arg(0) == 'node' && is_numeric(arg(1))) {
  $nid = arg(1);
  $node = node_load(array('nid' => $nid));
  $type = $node->type;
  if (isset($types[$type])) {
    $match = TRUE;
  }
}
return $match;
?>

Initial URL
http://www.packtpub.com/drupal-5-themes/book

Initial Description
From Drupal 5 Themes book.

Initial Title
Drupal Block Visibility: Check Node Type

Initial Tags
drupal

Initial Language
PHP