Drupal Block Visibility: Show On Blog and Forums


/ Published in: PHP
Save to your folder(s)

From Drupal 5 Themes book.


Copy this code and paste it in your HTML
  1. <?php
  2. if (arg(0) == 'blog') {
  3. return TRUE;
  4. }
  5. if (arg(0) == 'node' && ctype_digit(arg(1))) {
  6. $node = node_load(arg(1));
  7. if ($node->type == 'forum') {
  8. return TRUE;
  9. }
  10. }
  11. return FALSE;
  12. ?>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.