【发布时间】:2017-09-12 14:14:42
【问题描述】:
我尝试在自定义模块中制作我的自定义表单的模板,但我无法调用 .tpl.php
这是我在我的主题 template.php 文件中的函数(位于:drupal/sites/all/themes/atheme):
function atheme_theme() {
return array(
// Defines the form ID as a theme hook.
'agendize_multistep_form' => array(
// Specifies 'form' as a render element.
'render element' => 'form',
'path' => drupal_get_path('theme', 'atheme') . '/templates',
'template' => 'agendize_multistep_form',
),
);
}
我的表单 id 是:agendize_multistep_form(我用 drupal_set_message 检查过)
我的模板文件位于:
drupal/sites/all/themes/atheme/templates/agenize_multistep_form.tpl.php
我故意放了一个空白的tpl,以便显示一个空白表格。 但我仍然有(即使清除了缓存)我的表单显示了所有元素,就像我从未声明过这个主题覆盖一样。
感谢您的帮助
【问题讨论】: