我现在把所有事情都整理了.
我的hook_theme是这样的:
function cssswitch_theme() {
return array(
'cssswitch_display' => array(
'arguments' => array('node'),
),
'cssswitch_node_form' => array(
'arguments' => array('form' => NULL),
'template' => 'cssswitch-node-form.tpl.php',
),
);
}
我创建了文件theme / garland / cssswitch-node-form.tpl.php
然后,我可以控制将任何表单元素放在何处:
#edit-hour-start-wrapper, #edit-minute-start-wrapper, #edit-ampm-start-wrapper, #edit-hour-end-wrapper, #edit-minute-end-wrapper, #edit-ampm-end-wrapper {
float:left;
margin-right:25px;
}
Time Start
Time end