I'm hooking / theming preprocess_search_theme_form and using an image for my button, so I have to add to the src member of the submit array. This is all well and good and the code is going in the right place, but the path is going to the path of the search module, not the path of the theme as this should be:
$vars['form']['submit']['#attributes'] = array(
'id' => t('searchgo'),
'src' => t( base_path() . path_to_theme() . '/images/search_go.jpg')
) ;
src="/website/modules/search/images/search_go.jpg"
should be sites/all/themes/images/search_go.jpg
Is there a different function I should be using? I am subbing off Zen btw.
Thanks!
Adam
Comments
Dealing with the same problem
Dealing with the same problem here not sure if its a coincidence or not but using zen theme as well. under
returns modules/search
path_to_theme() preprocess returning module/search quick fix
http://drupal.org/node/194098 seems to be covering the same topic, i think?
Here is my quick practical workaround: