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条)

报告相同问题?

悬赏问题

  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了