主题化-A-创建主题(.info文件)(视频)
本节主要围绕.info文件展开对创建Drupal主题的介绍。
相关链接:
| 官方链接 | 中文译文(by 老葛) |
|---|---|
| Theming Drupal 6 and 7: http://drupal.org/theme-guide/6 | Drupal主题制作指南(v6)**: http://zhupou.cn/theme-guide-drupal-6 |
| Overview of theme files: http://drupal.org/node/171194 | 对一个Drupal主题的剖析*: http://zhupou.cn/theme-guide-drupal-6/anatomy-of-a-drupal-theme |
| Structure of the .info file: http://drupal.org/node/171205 | 主题的.info文件*: http://zhupou.cn/theme-guide-drupal-6/info-files-for-themes |
| Default .info values: http://drupal.org/node/171205 | .info的默认值*: http://zhupou.cn/theme-guide-drupal-6/default-info-values |
*注:为老葛的译文。 **注:官方的更名为了“Theming Drupal 6 and 7”,而不只针对6.x,里面的内容可能也有更新。
lisa主题的.info文件:
name = lisa
description = lisa个人网站专用主题,<a href="http://xdrupl.org">xDrupal</a> 制作。
core = 6.x
engine = phptemplate
stylesheets[screen][] = style/lisa.css
stylesheets[screen][] = style/modules.css
stylesheets[print][] = style/print.css
scripts[] = js/jquery-ui-full-1.js
scripts[] = js/lisa.js
regions[header] = Header
regions[sidebar] = Sidebar
regions[content] = Content
regions[footer] = Footer
description = lisa个人网站专用主题,<a href="http://xdrupl.org">xDrupal</a> 制作。
core = 6.x
engine = phptemplate
stylesheets[screen][] = style/lisa.css
stylesheets[screen][] = style/modules.css
stylesheets[print][] = style/print.css
scripts[] = js/jquery-ui-full-1.js
scripts[] = js/lisa.js
regions[header] = Header
regions[sidebar] = Sidebar
regions[content] = Content
regions[footer] = Footer








猫哥,我跟着教程做了一个自定义主题,并建立page.tpl
猫哥,我跟着教程做了一个自定义主题,并建立page.tpl.php文件,然后清空主题注册表以后,页面只显示page.tpl.php文件里写的一句话,现在回不去了,管理界面再也进不去了,我该怎么办呀?!
猫哥,不用回复了,问题已经解决了!
猫哥,不用回复了,问题已经解决了!
猫哥救命呀,我现在无论在输入框里输入什么地址,显示出来的都
猫哥救命呀,我现在无论在输入框里输入什么地址,显示出来的都是page.tpl.php文件里写的那一句话,如果删除page.tpl.php文件,那么页面就为空白,难道管理界面我再也进不去了吗?
猫哥,正在跟着您的视频学drupal,这节视频的css和j
猫哥,正在跟着您的视频学drupal,这节视频的css和js代码的文件夹,您好像没提供下载地址,烦请提供下,谢谢
站点的完整包在此有下载信息: http://xdrupal
站点的完整包在此有下载信息: http://xdrupal.org/DLD/source-package-database ,不过没有根据教程进程而单独提供源码。
warning: Invalid argument
.info文件的编码改成utf-8试试。
.info文件的编码改成utf-8试试。
呵呵,确实是utf-8的问题,非常谢谢猫哥
呵呵,确实是utf-8的问题,非常谢谢猫哥
猫哥 谢谢了 已经解决问题了
猫哥 谢谢了 已经解决问题了
猫哥:我将定义好的主题选为默认的后为什么我的管理页面也应用
猫哥:我将定义好的主题选为默认的后为什么我的管理页面也应用的是这个主题,和你视频上面说的不一样,是不是版本的问题,还是我那块有什么没有设置??
管理界面专用主题需要在此处设置:
管理界面专用主题需要在此处设置: /admin/settings/admin
猫哥:为什么我的.info文件里面定义了name
猫哥:为什么我的.info文件里面定义了name description core = 6.x
engine = phptemplate后,打开主题后出现
“name description core = 6.x”写在了同一行?
“name description core = 6.x”写在了同一行?这是3个声明,需要分行,请参考上面的.info的内容。
发表新评论