4.3.3 Tpl类
getInstance():实例化类
setDir():设置模板目录
setLayout():设置布局
output():抛出变量
showpage():显示模板
showTrace():显示trace信息
Tpl类使用示例:
//
设置模板文件夹路径
Tpl
::
setDir
(
'home'
);
//
设置布局文件
Tpl
::
setLayout
(
'home_layout'
);
//
向模板抛出内容,热门搜索
Tpl
::
output
(
'hot_search'
,
'
电脑,鼠标'
);
//
显示模板
Tpl
::
showpage
(
'member_profile.avatar'
);
Copyright ©2009 - 2014 shopnc.net.All rights reserved.
Powered By ShopNC