Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By akumar on
hi ,
i just want to hide my search block from my search result pages ..
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.