zoukankan      html  css  js  c++  java
  • 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
    这个文章很清楚的说明了这个情况

  • 相关阅读:
    JavaWeb—监听器
    JavaWeb-权限管理思路分析
    JavaWeb_检查用户是否登录的过滤器
    JavaWeb——字符编码过滤器
    JavaWeb_禁用浏览器缓存的过滤器
    JavaWeb-配置Filter的dispatcher节点
    JavaWeb_创建HttpFilter
    Filter练习一
    JavaWeb_Filter(过滤器)
    homestead 重复出错
  • 原文地址:https://www.cnblogs.com/qinqiu/p/7592486.html
Copyright © 2011-2022 走看看