没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > vivvo-template-engine |
|
vivvo-template-engine
|
| 1 | 0 | 2 |
| 贡献者 | 讨论 | 代码提交 |
Vivvo Template Engine is a light-weight yet powerful template engine written in PHP and completely PREG based. The system is currently v0.9, beta release.
It consists of only one highly-optimized object-oriented class, using basic, widely used tags like {if}, {foreach}, {literal}, {include}, {variable}. Its power comes from full support for objects, method calls, arrays and recursive templates.
Example usage: Basic template (index.tpl) using recursive inclusion of list.tpl template.
Index.tpl:
--------------------------------------------
{$TITLE}
{$TITLE}
{$list}
Object test
Object property call: {$object.a}
Object method call: {$object.get_a}
Demo source code:
{$source}
List.tpl:
--------------------------------------------
{foreach item = $item from = $list}
{$item[title]}
{if $item[sub_list] neq ''}
{include file = 'list.tpl' parse list = $item[sub_list]}
{/if}
{/foreach}
标签:
