jaxon-php / jaxon-smarty
Jaxon视图渲染器,用于Smarty模板引擎
v2.0.0
2017-06-29 14:42 UTC
Requires
- jaxon-php/jaxon-sentry: ~2.0
- smarty/smarty: ~3.1
Provides
This package is auto-updated.
Last update: 2024-08-30 14:57:07 UTC
README
在Jaxon应用中渲染Smarty模板。
安装
使用Composer安装此包。
"require": { "jaxon-php/jaxon-smarty": "~2.0" }
使用方法
对于包含Smarty模板的每个目录,将条目添加到配置中的app.views
部分。
'app' => array( 'views' => array( 'demo' => array( 'directory' => '/path/to/demo/views', 'extension' => '.tpl', 'renderer' => 'smarty', ), ), ),
在应用类中,这样渲染该目录中的视图。
$this->view()->render('demo::/sub/dir/file');
阅读文档了解Jaxon应用中视图的更多信息。