如何从头开始创建自定义drupal cms


How to create a custom drupal cms from starting

实际上我需要知道每个drupal页面的页面内容是如何以及在哪里出现的。所以我尝试将我自己的自定义主题集成到drupal中。在教程中,他们说,我需要创建一个自定义文件夹,并复制一个默认的主题,如花环/按钮到该文件夹。我得到了正确的,但是当我检查这些模板中的文件和函数时,用于创建模板的函数是不同的。例如,在pusbutton主题,我们没有模板。php,但在花环,我们必须有一个模板。php文件来显示内容。所以我很困惑,是drupal没有标准的方式或功能或文件来创建一个自定义的模板?数据是如何进入每一页的?

复制现有的核心主题文件夹并放入/sites/all/themes是一个很好的做法。drupal中的每个主题都是不同的。例如,使用template.php

For all the conditional logic and data processing of the output, there is the template.php file. It is not required, but to keep the .tpl.php files tidy it can be used to hold preprocessors for generating variables before they are merged with the markup inside .tpl.php files.

创建主题所需的唯一文件是.info file。

了解更多关于主题的信息