Php 如何在Drupal 7中将数据打印到面板窗格?
我正在尝试向面板发送数据 我有一个简单的.tpl文件,目前只打印一条消息:Php 如何在Drupal 7中将数据打印到面板窗格?,php,drupal,drupal-7,Php,Drupal,Drupal 7,我正在尝试向面板发送数据 我有一个简单的.tpl文件,目前只打印一条消息: <?php print $message; ?> 在panel.inc文件中,我有: /** * Implements hook_ctools_plugin_directory(). */ function message_ctools_plugin_directory($owner, $plugin_type) { if (($owner === 'ctools' && !empt
<?php print $message; ?>
在panel.inc文件中,我有:
/**
* Implements hook_ctools_plugin_directory().
*/
function message_ctools_plugin_directory($owner, $plugin_type) {
if (($owner === 'ctools' && !empty($plugin_type)) || ($owner === 'panels' && $plugin_type === 'styles')) {
return "plugins/$plugin_type";
}
}
/**
* Implements hook_theme().
*/
function message_theme() {
return [
'message_base' => [
'template' => 'theme/message',
'variables' => [
'message' => '',
],
],
];
}
function message_panel_render($subtype, $conf, $args, $contexts) {
$block = new stdClass();
$config = default_settings();
$block->content = [
'#theme' => 'message_base',
'message' => filter_xss($config['message']),
];
return $block;
}
当Idpm($block)时代码>在上述函数中,我看到所有内容都是正确的。只是什么都没有到达.tpl文件
有人知道我做错了什么吗?发现它在'.\message'=>过滤器xss($config['message']),