Es mostren els missatges amb l'etiqueta de comentaris visiibilitat. Mostrar tots els missatges
Es mostren els missatges amb l'etiqueta de comentaris visiibilitat. Mostrar tots els missatges

dimecres, 20 de març del 2013

Visualitzar un block només a un tipus de contingut

Not sure if I'm being too reckless, but this seems to be working fine for me, and it certainly looks more efficient in my eyes:

<?php
  $node = node_load(arg(1));
  $type = $node->type;
  return in_array($type,array('my_content_type'));
?>

My PHP coding background is certainly more developed than my Drupal background, so please let me know if I'm doing something I shouldn't be doing!

 

Més exemples i explicacions a: http://drupal.org/node/134425