skip to content

visibilité du block en fct du node type :)

09/04/2009
le code est en dessous.

<?php
      $match = FALSE;
      $types = array('article' => 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;
      ?>