实在不知道刚刚接触DP,应该从哪里看起了,就在官方文档中看到哪里就记录哪里吧
假设主题为 mytheme:
1、themes/mytheme/template.php(如果不存在的话,直接创建这个文件就可以了),定义区域如下:
t('left sidebar'), 'right' => t('right sidebar'), 'content' => t('content'), 'header' => t('header'), 'footer' => t('footer'), 'frontpage_top' => t('frontpage top'), 'frontpage_center' => t('frontpage center'), 'frontpage_bottom' => t('frontpage bottom'), ); } ?>
2、创建区域后,就需要在前台页面中显示,找开 page.tpl.php(没有话直接创建)
3、其它区域也是这样添加就可以了
4、为这些区域添加区块(blocks) Administer > Site Building > Blocks
5、如果不想在前台页面中显示默认的内容的话可以增加if判断,如
if(!$is_front) print $content;