- Регистрация
- 15 Авг 2011
- Сообщения
- 186
- Реакции
- 28
- Автор темы
- Заблокирован
- #1
Ребят подскажите как темизировать форму поиска, точнее из стандартной сделать свою?
Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Drupal 7.23, какой шаблон? Просто я из HTML шаблона делаюшаблон же есть для темизации. какая друпа кстати у Вас?
function carthelp_theme(){
return array(
'search_block_form' => array(
'arguments' => array('form' => NULL),
),
);
}
function carthelp_search_block_form($form) {
$output = '';
unset($form['search_block_form']['#title']);
$form['search_block_form']['#attributes']['class'] = 'sbox';
$form['submit']['#type'] = 'image_button';
$form['submit']['#id'] = 'b_img';
$form['submit']['#src'] = drupal_get_path('theme', 'carthelp') . '/images/sbtn.png';
$form['submit']['#attributes']['class'] = 'sbtn';
$form['search_block_form']['#value'] = 'поиск';
$form['submit']['#value'] = 'Найти';
$form['search_block_form']['#attributes'] = array(
'onBlur'=> "if (this.value.length == 0) {this.value='{$form['search_block_form']['#value']}'}",
'onFocus'=> "if (this.value== '{$form['search_block_form']['#value']}') {this.value=''}"
);
$output .= drupal_render($form);
return $output;
}