เพิ่ม Regions ใน Frontpage

เราจะเพิ่ม regions ในหน้าแรกหรือ frontpage ได้อย่างไร?

Drupal theme,theme,premium theme
การเพิ่ม regions ทำดังนี้

1. เปิดไฟล์ ที่ลงท้ายด้วย .info (เช่น ใช้ธีม Garland ก็เปิดไฟล์ garland.info)  ที่อยู่ใน  themes/mytheme/ แล้วเพิ่มโค้ดตามนี้

1.

2.

3regions[bottom_left] = bottom_left

4regions[bottom_center] = bottom_center

5regions[bottom_right] = bottom_right

2. เปิดไฟล์ page.tpl.php ที่อยู่ใน themes/mytheme folder
เพิ่มโค้ด regions ในตำแหน่งที่ต้องการ

01<?php if ($is_front || strstr($_GET['q'], 'admin/block')) : ?>

02<div id="bottom_left">

03<?php  print $bottom_left ?>

04</div>

05<pre><div id="bottom_center">

06<?php  print $bottom_center ?>

07</div></pre>

08<pre><div id="bottom_right">

09<?php  print $bottom_right ?>

10</div></pre>

11<p><?php endif; ?></p>

3. ตำแหน่ง regions ใหม่ที่เราเพิ่มเข้าไปจะเห็นปรากฎใน Administer > Site Building > Blocks

Credit: เพิ่ม Regions ใน Frontpage | kruSak Blog
Under Creative Commons License: Attribution