theme.info 设置和theme后台设置

.info里面的设置在清除缓存后会反映到后台界面的设置上来。如果是后台设置了,那么他的优先级是最高的。

---
母模板和子模板:
css同名的话,会被覆盖
js如果同名的话,会被覆盖
template.php里面的函数也会被继承到子模板里面来。

There are two main types of functions in template.php: theme function overrides and preprocess functions. The template system handles these two types in very different ways.

Theme functions are called through theme('[hook]', $var, ...). When a sub-theme overrides a theme function, no other version of that theme function is called.

On the other hand, preprocess functions are called before processing a .tpl file. For instance, [theme]_preprocess_page is called before page.tpl.php is rendered. Unlike theme functions, preprocess functions are not overridden in a sub-theme. Instead, the parent theme preprocess function will be called first, and the sub-theme preprocess function will be called next.

theme function: 覆盖
theme process function: 被继承/集成到子模板里

There is no way to prevent all functions in the parent theme from being inherited. As stated above, it is possible to override parent theme functions. However, the only way to remove a parent theme's preprocess function is through hook_theme_registry_alter().

甚至都无法阻拦木模板里的函数的执行

Overriding inherited .tpl.php templates: Add a template file with the same name in your sub-theme folder to have it override the template from the parent theme.
TPL文件会被集成/继承到子模板里, 如果相同名字则会被覆盖。

logo(logo.png/logo.jpg)
favicon (favicon.ico)
will not be inherited. 不会被继承/集成到子模板里

当修改了模板的区域设置时, 需要刷新缓存才行

----
要想获得整套的变量
drush vget
drush vget | grep ' '

------

https://www.drupal.org/docs/7/theming/creating-a-sub-theme
这个文章很清楚的说明了这个情况

转载于:https://www.cnblogs.com/qinqiu/p/7592486.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值