If you are using the 'Search form' block, you could 'configure' this block on the 'admin/build/block' page.
In the 'Page specific visibility settings',
Select 'Show on every page except the listed pages.'
In the Pages textarea enter the follwoing :
search/*
This should hide the search block on the search result pages.
Use Path rule in a new context
~search/*
and add the block in the desired region. Will show on all pages except the search pages.
Import this context if you prefer and just adjust the region and weight to suit your needs.
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
$context->api_version = 3;
$context->name = 'search';
$context->description = 'Show search bar on every page except search pages';
$context->tag = 'site';
$context->conditions = array(
'path' => array(
'values' => array(
'~search/*' => '~search/*',
),
),
);
$context->reactions = array(
'block' => array(
'blocks' => array(
'search-form' => array(
'module' => 'search',
'delta' => 'form',
'region' => 'secondary_content',
'weight' => '-10',
),
),
),
);
$context->condition_mode = 0;
// Translatables
// Included for use with string extractors like potx.
t('Show search bar on every page except search pages');
t('site');
Comments
Try Css
hi,
Try to hide using css.
Thanks,
Instead of css use
Instead of css use hook_form_alter in your module.
Thanks,
Vijay Thummar
this one works (for drupal
this one works (for drupal 7)
--
keine zeit für spielkonsolen mein leben ist jump n run!
valderama.net
This didn't work for me, but
This didn't work for me as a theme hook, but did work when I replaced
$form = array()
with
$form['#access'] = FALSE;
Configure the 'Search form' block
If you are using the 'Search form' block, you could 'configure' this block on the 'admin/build/block' page.
In the 'Page specific visibility settings',
Select 'Show on every page except the listed pages.'
In the Pages textarea enter the follwoing :
search/*
This should hide the search block on the search result pages.
Prakash
Can also be configured in Context
Use Path rule in a new context
~search/*
and add the block in the desired region. Will show on all pages except the search pages.
Import this context if you prefer and just adjust the region and weight to suit your needs.