作好ECSOTRE模块后,需在主题中添加模板,而添加模板页面时只有产品分类页、产品详细页、首页等内置模块的模板类型。php
下面介绍如何添加一个自定义的模板类型“buildings”。html
1、修改(建议复制到你的二开目录再改):app
/app/site/lib/theme/tmpl/dbsave.php函数
/app/site/lib/theme/tmpl/fssave.phpui
中的函数:this
__get_tmpl_list,"buildings" 为app/自建模块/site.xml中的module>name
private function __get_tmpl_list() { $ctl = array( 'index'=>app::get('site')->_('首页'), 'gallery'=>app::get('site')->_('商品列表页'),
...
'buildings'=>app::get('site')->_('楼盘首页'), //added by vmax @ 2014.3.3 ... return $ctl; }
2、spa
在自建模块的 controller 中,模板文件输出(即 $this->page('site/xxxxx.html'); )前添加: $this->set_tmpl('xx');code
超级简单是否是!xml