2013-05-03 16 views
2

其實我需要知道每個drupal頁面的頁面內容如何以及在哪裏出現。所以我試圖將我自己的自定義主題集成到Drupal。在教程中,他們說我需要創建一個自定義文件夾,並將其中一個默認主題(如花環/按鈕)複製到該文件夾​​中。我知道它是正確的,但是當我檢查這些模板中的文件和函數時,用於創建模板的函數是不同的。例如在pusbutton主題中,我們沒有template.php,但是在花環中,我們必須有一個template.php文件來顯示內容。所以我越來越困惑,是Drupal沒有標準方式或功能或文件來創建自定義模板?數據如何進入每個頁面?如何從開始創建自定義Drupal cms

回答

1

複製現有核心主題文件夾並放入inside/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文件。

瞭解How theme works的更多信息