推荐一个Template: patTemplate
patTemplate is a very powerful template engine that helps you separating program logic or content from layout.
patTemplate was designed for web applications and easily works in combination with databases and other data sources. Based on XML-Like tags, patTemplate offers a bunch of useful functions that originated out of a webdeveloper's daily needs. From adding database query results directly to a template with only two lines of code or conditional templates, you'll certainly find what you need...
Developer(s) : Stephan Schmidt
Current Version : v2.4
License : LGPL
Currently the following features are implemented:
use special xml tags, to separate a document into templates
use an infinite amount of templates in one page
read from several plain html files
local and/or global variables
automatic repetition of templates to build lists
automatically create alternating lists by using OddEven templates
automatically enumerate entries in lists
templates can have child templates
subtemplates to do simple if(); elseif(); else(); statements
strip or replace unused variables from html
hide/show templates in a document
read external files with/without parsing them
strip leading/trailing whitespace in lines for smaller html code
use a template several times in a document by linking to it
quote template tags to use them in a second parsing process (enables you to build templates from templates)
output any ASCII format you like (HTML, txt, XML, LaTex,...)
主页: http://www.php-tools.de/site.php?&file=patTemplateOverview.xml
教程: http://www.devshed.com/Server_Side/PHP/patTemplate/patTemplate1/page1.html
问题点数:0、回复次数:1Top
1 楼allkill(傲气游)回复于 2003-06-01 22:38:17 得分 0
看了看代码。感觉太胖了。担忧速度啊!光个模板类文件就一千多行代码。Top




