Hi,
What's the correct way to do this? I already have a search_box in my themes and don't need the extra search form. I can live with the search form as long as the extra text doesn't appear
-v
Quoting VJ vijaiprao@gmail.com:
Hi,
What's the correct way to do this? I already have a search_box in my themes and don't need the extra search form. I can live with the search form as long as the extra text doesn't appear
Others may have better ideas but the only method at the moment I can think of is to use a path alias. One of the benefits of the search module is the page you describe. How is the user getting directed to /search?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
This is somewhat of an issue in Drupal, and frankly you might consider filing a bug against core for this, if one doesn't already exist. The only way to ultimately remove that form from that page is to modify search.module (*%^@&^!!!!)
See: http://api.drupal.org/api/function/search_view/5 http://api.drupal.org/api/function/search_view
If you look at the bottom of those functions you'll see:
$output = drupal_get_form('search_form', NULL, $keys, $type); $output .= $results
In other words, do not pass go, do not ask the user, do not theme this page (except using a page template(which doesn't help)), and you get the form no matter what.
You can however, disable the advanced portion of the search by visiting the Access Control page under User Management in the Administer section of your site.
-Mike
On Apr 6, 2008, at 6:46 PM, VJ wrote:
Hi,
What's the correct way to do this? I already have a search_box in my themes and don't need the extra search form. I can live with the search form as long as the extra text doesn't appear
-v
-- [ Drupal support list | http://lists.drupal.org/ ]
__________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax
Thanks
On Mon, Apr 7, 2008 at 1:20 PM, Michael Prasuhn mike@mikeyp.net wrote:
This is somewhat of an issue in Drupal, and frankly you might consider filing a bug against core for this, if one doesn't already exist. The only way to ultimately remove that form from that page is to modify search.module (*%^@&^!!!!)
See: http://api.drupal.org/api/function/search_view/5 http://api.drupal.org/api/function/search_view
If you look at the bottom of those functions you'll see:
$output = drupal_get_form('search_form', NULL, $keys, $type); $output .= $results
In other words, do not pass go, do not ask the user, do not theme this page (except using a page template(which doesn't help)), and you get the form no matter what.
You can however, disable the advanced portion of the search by visiting the Access Control page under User Management in the Administer section of your site.
-Mike
On Apr 6, 2008, at 6:46 PM, VJ wrote:
Hi,
What's the correct way to do this? I already have a search_box in my themes and don't need the extra search form. I can live with the search form as long as the extra text doesn't appear
-v
-- [ Drupal support list | http://lists.drupal.org/ ]
Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax
-- [ Drupal support list | http://lists.drupal.org/ ]
Heine suggested a small module with an override function :
<?php function searchoverride_form_alter($form_id, &$form) { if ($form_id == 'search_form') { $form['basic']['#title'] = ''; $form['advanced']['#type'] = 'hidden'; $form['basic']['#type'] = 'hidden'; } }
?>
That works for what I want to do
On Mon, Apr 7, 2008 at 7:31 PM, VJ vijaiprao@gmail.com wrote:
Thanks
On Mon, Apr 7, 2008 at 1:20 PM, Michael Prasuhn mike@mikeyp.net wrote:
This is somewhat of an issue in Drupal, and frankly you might consider filing a bug against core for this, if one doesn't already exist. The only way to ultimately remove that form from that page is to modify search.module (*%^@&^!!!!)
See: http://api.drupal.org/api/function/search_view/5 http://api.drupal.org/api/function/search_view
If you look at the bottom of those functions you'll see:
$output = drupal_get_form('search_form', NULL, $keys, $type); $output .= $results
In other words, do not pass go, do not ask the user, do not theme this page (except using a page template(which doesn't help)), and you get the form no matter what.
You can however, disable the advanced portion of the search by visiting the Access Control page under User Management in the Administer section of your site.
-Mike
On Apr 6, 2008, at 6:46 PM, VJ wrote:
Hi,
What's the correct way to do this? I already have a search_box in my themes and don't need the extra search form. I can live with the search form as long as the extra text doesn't appear
-v
-- [ Drupal support list | http://lists.drupal.org/ ]
Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax
-- [ Drupal support list | http://lists.drupal.org/ ]
Ah, that wasn't registering with me at the time, a very nice way of accomplishing that. I still wish there was an option to hide the form.
-Mike
On Apr 9, 2008, at 5:35 AM, VJ wrote:
Heine suggested a small module with an override function :
<?php function searchoverride_form_alter($form_id, &$form) { if ($form_id == 'search_form') { $form['basic']['#title'] = ''; $form['advanced']['#type'] = 'hidden'; $form['basic']['#type'] = 'hidden'; } } ?>
That works for what I want to do
__________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax
FYI: The formdefaults module can also be used to hide fields and/or changed titles for fields on individual forms without having to write code.
Dave
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Michael Prasuhn Sent: Wednesday, April 09, 2008 10:12 AM To: support@drupal.org Subject: Re: [support] correct way to hide 'enter your keywords' and'advanced search' from website.com/search
Ah, that wasn't registering with me at the time, a very nice way of accomplishing that. I still wish there was an option to hide the form.
-Mike
On Apr 9, 2008, at 5:35 AM, VJ wrote:
Heine suggested a small module with an override function :
<?php function searchoverride_form_alter($form_id, &$form) { if ($form_id == 'search_form') { $form['basic']['#title'] = ''; $form['advanced']['#type'] = 'hidden'; $form['basic']['#type'] = 'hidden'; } } ?>
That works for what I want to do
__________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax