Drupal模板/主题资源或建议? [英] Drupal Templating/Theming Resources or Advice?

查看:125
本文介绍了Drupal模板/主题资源或建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣为正在开发的Drupal网站创建一个自定义主题。我是Drupal的新人,但是在构建一个主题(CSS,PHP,HTML)的基础概念方面我有一个体面的经验。

所以,我的问题是 - 我从哪里开始?有没有一个规范的指南来创建Drupal主题?我应该注意的资源(主题指南除外)?其他人遇到过的知识,还是那些更有经验的人的智慧的一般话语?

I'm interested in creating a custom theme for a Drupal site I'm working on. I am new to Drupal, however I have a decent bit of experience in working with the underlying concepts that it seems are needed to build a theme (CSS, PHP, HTML).
So, my question is - where do I start? Is there a canonical guide to creating Drupal themes? Resources that I should be aware of (other than the Theming Guide)? Gotchas that others have encountered, or just general words of wisdom from those who are more experienced?

推荐答案

最好的方式是从一个主题开始,并逐一修改。这就是我知道做的大多数人。您将主题/花环目录复制到sites / all / themes / garland修改,然后更改其中的一些内容以反映新的更改(原则上您将.info文件重命名为新的目录位置,编辑它将花环改成你的新目录),然后你一点一点地改变文件中的东西来反映你的设计。

The best way to do it is to start with a theme, and modify it bit by bit. That's how most of the people whom I know do it. You take the themes/garland directory and copy it to sites/all/themes/garland-modified, then you change a few things in it to reflect the new change (in principle you rename the .info file to the new directory location and you edit it to change garland to your new directory), then you go bit by bit and change things in the files to reflect your design.

这可能看起来很乏味,浪费的时间(为什么不从零开始?),但你有几个优点:

This may seem tedious and a waste of time (why not just start from scratch?) but you have several advantages:


  • 你从一个工作主题开始

  • 你可以从一个完整的主题开始,所有你想要的东西,你不要忘记有必要的工作站点

有一些入门工具包,应该使事情变得更简单(参见例如禅宗主题),您基本上按照上面所概述的方式编辑。但是我发现他们有点难以理解...

There are starter kits which are supposed to make things easier (see the zen theme for example) which you basically edit in a similar way I outlined above. But I found them a bit harder to understand...

祝福Drupal主题:)

Good luck with Drupal theming :)

这篇关于Drupal模板/主题资源或建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆