dongshungai4857 2014-05-05 12:02
浏览 95
已采纳

每个节点类型覆盖html.tpl.php不起作用

I saw that this was asked few times before, and i tried the answers, and i tried modifying the answers, yet nothing.

Case: I have advanced forums installed, and i am using appcache(don't you dear to run away now!) Obviously i need to turn appcache off when surffing forums, and i managed to make custom html.tpl.html for /forum and /forums, so when i am looking forum list and topic list i wont get cached. But then: When i am looking at forum topic, it is a post ofc, and post type (machine type is forum) and i have defined in template.php:

function flowrox_preprocess_html(&$vars) {
    $node = menu_get_object();

    if ($node && $node->nid) {
        $vars['theme_hook_suggestion'][] = 'html__' . $node->type;
    }
}

and it wont make change.

So i am able to change html.tpl.php for path but not for node type. Help me please and correct my knowledge for making such things.

Thanks for all!!! (btw i dont need a lesson of appcache, sincerely if you have manifest = x.appcache" in your html tag it will cache it, even if it's in network section)

  • 写回答

2条回答 默认 最新

  • duanbi5906 2014-05-05 12:42
    关注

    O M G, I feel so sorry for you now.

    It should be $vars['theme_hook_suggestions'] and not $vars['theme_hook_suggestion'] (the s at the end of suggestion)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64
  • ¥15 iOS 自定义输入法-第三方输入法
  • ¥15 很想要一个很好的答案或提示
  • ¥15 扫描项目中发现AndroidOS.Agent、Android/SmsThief.LI!tr
  • ¥15 怀疑手机被监控,请问怎么解决和防止
  • ¥15 Qt下使用tcp获取数据的详细操作