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
    这个文章很清楚的说明了这个情况

  • 相关阅读:
    图解 SQL 各种连接查询之间的区别
    虚拟机Ubuntu无法上网问题解决过程
    SQL语言(二) java怎样连接操作数据库中的数据
    SQL语言(一)
    编写简单的用户登录界面
    Java
    java第一阶段测试
    Net Core linux docker 部署异常
    .Net Core Cap 异常
    记.Net 创建文件
  • 原文地址:https://www.cnblogs.com/qinqiu/p/7592486.html
Copyright © 2011-2022 走看看