Hi,
I created landing page using Panel, http://localhost/landing
but when I key in wrong password the URL are redirect to http://localhost/landing?destination=landing,
and there is additional space on top of my banner.
I already set Disable Drupal blocks/regions, but somehow the block seem enabled.

Any ideas anyone?
Thanks!

Comments

Letharion’s picture

Title: Drupal blocks/regions still showing » Drupal blocks/regions showing despite them being disabled
Component: Miscellaneous » Documentation
Assigned: Unassigned » merlinofchaos

Actually, I never did understand exactly how that setting worked either, so I'm gonna assign this one to Merlin, and hope he's got time to elaborate.

Afterwards this should be remembered for the docs.

deltab’s picture

Any progress on this issue? I can also do with an "elaboration" form Merlin, and if possible, avail some decent documentation

merlinofchaos’s picture

Because the setting was removed in D7, in D6 we fake it by disabling any region with the word 'sidebar' in it. Non-sidebar regions are still enabled (which is more or less how it worked in D6).

CaptShmo’s picture

Issue summary: View changes

I was able to make this setting work with a custom hook as follows. This is probably not the best way to do this but here it is anyway, use it at your own risk.


/* implements hook_block_list_alter */
function yourmodulename_block_list_alter(&$blocks) {

  $check = drupal_static('ctools_set_no_blocks', TRUE);
 
  if (!$check) {
   
    /* region names below are as you find them in your theme.info file */

    $regionsToDisable = array(
  	'region_1',
        'region_2',
  	);
    
   /* if you need to disable specific blocks, put their delta's here. you could use block id also, but this worked best for my needs */  

  	$blocksToDisable = array(
  	 '12',
  	);
  
    foreach ($blocks as $block_id => $block) {
      if (in_array($block->region, $regionsToDisable) || in_array($block->delta, $blocksToDisable)) {
        unset($blocks[$block_id]);
      }
    }
  }
}