visibility

Determines the visibility of Custom pagers depending on node type and URL

  1. if (($node->type == 'photo') && (arg(1) === 'category')) {
  2.   return TRUE;
  3. }
  4. else {
  5.   return FALSE;
  6. }

block node visibility

  1. <?php
  2. if (arg(0) == 'user' && arg(1) == $user->uid) {
  3.   return true;
  4. }
  5. ?>

Fix for Fix for Trying to control visibility of a block

  1.   <?php
  2.   if ((arg(0) == 'node') && is_numeric(arg(1))) {
  3.     $node = node_load(arg(1));
  4.     if ($node->type =='hotel'){
  5.       return FALSE;
  6.     }
  7.     return TRUE;
  8.  }
  9. ?>

Fix for Trying to control visibility of a block

  1.   <?php
  2.   if ((arg(0) == 'node') && is_numeric(arg(1))) {
  3.     $node = node_load(arg(1));
  4.     if ($node->type =='hotel'){
  5.       return FALSE;
  6.     }
  7.   return TRUE;
  8.  
  9. ?>

Trying to control visibility of a block

  1.   <?php
  2. $match = true;
  3.   if ((arg(0) == 'node') && is_numeric(arg(1))) {
  4.   $node = node_load(arg(1));
  5.   if ($node->type =='hotel'){
  6.   $match = false;
  7.   }
  8.   return $match;
  9.  
  10. ?>

Blog author information

  1. <?php
  2. // $Id$
  3.  
  4. /**
  5.  * @file
  6.  * Implements block for showing archives, user picture, and links for blog sidebars.
  7.  */
  8.  
  9. function blog_sidebar_block($op = 'list', $delta = 0, $edit = array()) {
Syndicate content