修改首頁的template

你可以使用一個和其他頁面完全不同的首頁, 只要你能應用 template suggestion.

打開你的theme_developer module, 指一下首頁,
你便會發現frontpage 是有一個特別的suggestion: page-front.tpl.php

你只要在你的theme folder 內建立/複製一個page-front.tpl.php,
然後你便可以開始加特別的class 到body,
或者使用完全不同的region (front-left, front-mid-left, front-mid-right, front-right)
把首頁變作4欄以應付首頁大量資料的需求

p.s. 記得清空你的cache 以使用新增的page-front.tpl.php
p.p.s 你當然也可以使用panels 之類的模組完成相同的效果

原文: http://drupal.org/node/317461

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <h4> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options