I'm attempting to put a search block into my Drupal 7 theme. I have included the following into the theme:
<?php
$block = block_load('dkan_sitewide', 'dkan_sitewide_search_bar');
if($block):
$search = _block_get_renderable_array(_block_render_blocks(array($block)));
print render($search);
endif;
?>
The above code was taken from the Nuboot Radix theme.
This is what I see:
How do change the search bar? I want to:
- Remove the label
- Move the submit button onto the same line as the search bar
- Stop the bar going full width
- Change the button text
- Change the text inside the search bar
There is a function in
/profiles/dkan/modules/dkan/dkan_sitewide/dkan_sitewide.blocks.inc
calleddkan_sitewide_dataset_search_form
:Editing the values in this array gives you some (very limited) control over the styling of the global search bar.
Keep in mind that editing this file directly is a bad idea, since it will be overwritten with the default contents every time you update DKAN. Unfortunately I am unable to find any other workout at the moment.