Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to edit search area in drupal
    primarykey
    data
    text
    <p>In my site www.rchealth.co.uk, I want to add the search.</p> <p>I have enabled the search module and the search block is in the header, now I want to customize the search look and feel to look better. </p> <p>I have searched and found some methods like <a href="http://systemseed.com/blog/how-customise-search-box-drupal-6" rel="nofollow">http://systemseed.com/blog/how-customise-search-box-drupal-6</a> and <a href="http://drupal.org/node/154137" rel="nofollow">http://drupal.org/node/154137</a> </p> <p>I followed the steps but I am still unable to edit the template. My drupal version is 6.17</p> <p>i pasted this code in template.php</p> <pre><code>function accordlaw_preprocess_search_block_form(&amp;$vars, $hook) { // Modify elements of the search form unset($vars['form']['search_block_form']['#title']); // Set a default value for the search box $vars['form']['search_block_form']['#value'] = t('Search RC Health'); // Add a custom class to the search box // Set yourtheme.css &gt; #search-block-form .form-text { color: #888888; } $vars['form']['search_block_form']['#attributes'] = array( 'onblur' =&gt; "if (this.value == '') {this.value = '".$vars['form']['search_block_form']['#value']."';} this.style.color = '#000000';", 'onfocus' =&gt; "if (this.value == '".$vars['form']['search_block_form']['#value']."') {this.value = '';} this.style.color = '#000000';" ); // Modify elements of the submit button unset($vars['form']['submit']); // Change text on the submit button //$vars['form']['submit']['#value'] = t('Go!'); // Change submit button into image button - NOTE: '#src' leading '/' automatically added $vars['form']['submit']['image_button'] = array('#type' =&gt; 'image_button', '#src' =&gt; base_path() . path_to_theme() . '/images/search-button.png'); // Rebuild the rendered version (search form only, rest remains unchanged) unset($vars['form']['search_block_form']['#printed']); $vars['search']['search_block_form'] = drupal_render($vars['form']['search_block_form']); // Rebuild the rendered version (submit button, rest remains unchanged) unset($vars['form']['submit']['#printed']); $vars['search']['submit'] = drupal_render($vars['form']['submit']); // Collect all form elements to print entire form $vars['search_form'] = implode($vars['search']); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload