开发者

How to make unique drupal theme for one page

I have a custom drupal theme which i would need to customiza a bit. I h开发者_如何学JAVAave ten pages that would need unique layout, different than on normal pages. Now i know i can make a new page_something.tpl and to the name the name of the page to make an own template for one page but how can i make all 10 pages to use that template?


I would suggest creating a content type for the pages you wish to look the same as often they will share similiar features in terms of content (CCK fields).

For theming you can the use (from d.o):


node-[type].tpl.php
base template: node.tpl.php

In Drupal 7, templates for specific content types are created slightly different than in Drupal 6.

Drupal 6: node-mytype.tpl.php Drupal 7: node--mytype.tpl.php

See node.tpl.php in the Drupal API documentation for more information.

Note that in order to override the template for a specific node type, the theme must also implement the base node.tpl.php file. If this file is omitted, the theme will not detect the presence of node-[type].tpl.php files.


Take a look at the ThemeKey module. With it a different theme shows based on conditions you set.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜