开发者

theme_status_messages() is not firing in my Drupal 6 theme

I have a template.php file with a theme called themename_status_messages

It's not being called/invoked by my theme.

When I use devel themer info on a test dsm output, I am told the candidate functions are: theme_messages_alter_status_messages()

themename_messages_alter_status_messages()

I'm not sure why the status_messages() call isn't being called 开发者_Python百科during page load. Any ideas?


Looks like the problem was there was a module enabled that changed how this was handled, and I didn't know the module was there and did that. The module was Messages Alter. Taught me a good less on in check the modules page for mysteries.


On your page.tpl.php, is there a $messages var being printing on the page anywhere?

A better way to see if $messages are being passed to your theme is to use a THEME_preprocess_page(&$vars) function in template.php:

function THEME_preprocess_page(&$vars) {
  dpm($vars);
  // or use $dpr($vars) for a textual array printout
  // Replace 'THEME' in the function name with the name of your theme.
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜