dashan 提交于
论坛:
针对不同的内容类型“video”定制不同的html.tpl.php模板,可以在模板下面的template.php 增加下面代码:
1 2 3 4 5 6 7 |
function yourthemename_preprocess_html(&$vars) { if ($node = menu_get_object()) { if($node->type == "video") { $vars['theme_hook_suggestions'][] = 'html__video'; } } } |
复制modules/system目录下的html.tpl.php到templates下面, 然后修改它html--video.tpl.php。
清空缓存。
- 登录以发表评论