【发布时间】:2011-05-26 13:39:50
【问题描述】:
我的问题是
<?php drupal_set_message('Hello World'); ?>
在 node.tpl.php 中
在node.tpl.php中,我也做了
<?php print_r(get_defined_vars()); ?>
查看主题模板是否设置正确。答案是肯定的。
我的 [theme].info 文件中还设置了 page_top 和 page_bottom
regions[content] = Content
regions[help] = Help
regions[page_top] = Page Top
regions[page_bottom] = Page Bottom
$messages 在 page.tpl.php 中输出
<div id="messages">
<?php print $messages; ?>
</div>
在检查了所有这些之后,drupal_set_message() 在 node.tpl.php
中仍然不起作用【问题讨论】:
标签: php drupal drupal-7 drupal-theming drupal-templates