Drupal6.x のテーマに表示領域の追加を行いたい場合がある。
1、/sites/all/themes/{name}/{theme name}.info 内に
regions[xxxxx] = yyyyy
を追加する。
2、/sites/all/themes/{name}/templates/page.tpl.php 内の表示したい箇所に
<?php if ($xxxxx): ?>
<span id="xxxxx">
<?php print $xxxxx; ?>
</div>
<?php endif; ?>
を追加する。
3、管理セクション→サイトの環境設定→パフォーマンスでデータキャッシュをクリアする。
(上記を忘れがちなので注意)
4、管理セクション→サイトの構築→ブロックで確認すると新しい領域が追加されている。
Leave a Reply