开发者

How to use a different view or template for a specific content type in drupal

I am figuring myself around Drupal.

I have understood that there are regions specified (in page.tpl and theme.info files). But my website requires different pages to have different layouts, how should I go about doing this ?

I figured, if I could make a custom Content-Types开发者_JAVA技巧 and I would like each content type to point to a specific tpl.php file.

Is this possible, or is there a better (correct) way of doing this ?


There are a ton of ways to accomplish this, depending on your needs. I would suggest reading the pages about Drupal template suggestions: http://drupal.org/node/223440 and http://drupal.org/node/190815

The easiest way to start out with this is to make a new node.tpl.php for your content type.

A more complex way is to design your site using Panel pages. You can set up a panel context for each content types, and then do whatever you want.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜