Drupal除了提供了強大的系統以外
也將程式與外觀分隔得很清楚
一般預設就有幾個Theme(版型)可以選擇
如果會php、css、javascript、jquery的話
還可以自己修改這些版型!
版型的資料都存放在 drupal/themes/theme_name底下
假設今天我們想要創造一個新的版型叫做newTheme
則我們的版型目錄就會在drupal/themes/newTheme
而在這個資料夾底下會有以下這些資料
newTheme.info
    info檔主要是說明這個theme的一些資訊,包括define block regions、define style sheets..等,都在這個info檔裡面說明

*.tpl.php (template files)
    利用xHTML和php去設定你的版面外觀,也就是我們主要更改的地方

template.php
    對於所有外觀的資料來源、程式流程..等都在這個地方

sub-themes
    繼承parent themes的設定,而另外可以自己新增其他設定


page.tpl is not a template for the page content type (node)
egeos - September 19, 2008 - 07:49

The 'page.tpl' template defines the overall template for the site.
It is not a template for the content type (node) page.

Because page.tpl and the page share the same name this could cause confusion/uncertainty.

Changing the template for the content type 'page' is subtheming as page is a type of node.

Therefore it is a subset of the 'node.tpl' template.

To alter the template for the page content type you would create or edit a 'node-page.tpl'
(this extends to all node types: node-blog.tpl, node-story.tpl, node-[custom].tpl)

There are no node-page.tpl templates in the core themes to copy.
So modifying the node.tpl is the starting point.

Therefore there is page.tpl for the entire layout and node-page.tpl for the content type.

arrow
arrow
    全站熱搜

    austintodo 發表在 痞客邦 留言(0) 人氣()