1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

PHP各种Template系统

本帖由 小叶2006-03-21 发布。版面名称:后端开发

  1. 小叶

    小叶 New Member

    注册:
    2005-09-04
    帖子:
    17,941
    赞:
    33
    学习学习。:p

    Easy Template System
    http://ets.sourceforge.net/
    http://ets.sourceforge.net/ets.pdf
    http://prdownloads.sourceforge.net/ets/ets305b.zip?download

    Smarty
    http://smarty.php.net/

    FastTemplate
    http://www.thewebmasters.net/php/FastTemplate.phtml
    http://www.thewebmasters.net/php/FastTemplate-1_1_0.tar.gz

    bTemplate
    http://www.massassi.com/bTemplate/
    http://www.massassi.com/bTemplate/download/bTemplate_0.3.zip

    ModeliXe
    http://modelixe.phpedit.com/

    UltraTemplate
    http://www.ultratemplate.com/main.php

    PHPTemplate
    http://nutbar.chemlab.org/

    PHPLib
    http://sourceforge.net/projects/phplib

    XTemplate
    http://sourceforge.net/projects/xtpl/

    SmartTemplate
    http://www.phpclasses.org/browse/package/1032.html

    Yapster
    http://yapter.sourceforge.net/
    http://www.phpclasses.org/browse.html/class/37.html

    Zend专辑
    https://www.zend.com/codex.php?CID=332

    SledgeHammer
    http://sledgehammer.sourceforge.net/

    phpSavant
    http://phpsavant.com/

    SmashTemplate
    http://www.phpclasses.org/goto/browse.html/package/1401.html
    http://www.lri.fr/~gk/PHPTMPL/

    AwesomeTemplateEngine
    http://www.pinkgoblin.com/index.php?view=scripts
    http://www.pinkgoblin.com/scripts/AwesomeTemplateEngine.zip

    Virtual Template
    http://sourceforge.net/projects/vtemplate/

    TemplateTamer工具
    http://www.templatetamer.org

    Phemplate
    http://pukomuko.esu.lt/phemplate/

    Templates engine for PHP
    http://sourceforge.net/projects/php-templates

    YATS
    http://yats.sourceforge.net

    iTemplate
    http://sourceforge.net/projects/itemplate

    Cached Fast Template
    http://zoned.net:8000/~xkahn/php/fasttemplate/

    AvanTemplate
    http://avantemplate.sourceforge.net/

    PHPWidgets
    http://www.northern.ca/projects/phpwidgets

    tinybutstrong
    http://www.tinybutstrong.com/download.php

    SuperTPL 国人产,呵呵
    http://www.phpw.net
     
  2. 相当

    相当 New Member

    注册:
    2006-03-28
    帖子:
    9,431
    赞:
    42
  3. 西子宜

    西子宜 Well-Known Member

    注册:
    2005-09-05
    帖子:
    15,739
    赞:
    62
    了解下
     
  4. redfox

    redfox New Member

    注册:
    2006-03-30
    帖子:
    106
    赞:
    0
    我也喜欢 SmartTemplate

    但现在我对模板不是很喜欢。我更喜欢替换型的,我自己做cache 控制。
     
  5. qxzw

    qxzw New Member

    注册:
    2005-12-08
    帖子:
    25
    赞:
    0
    推荐一个patTemplate

    1. Features
    The following features are new to patTemplate since version 3.0.0:
    1.1 Improved reader
    The reader now accepts tags and data or even several tags in one line.
    1.2 New architecture
    patTemplate is now split into several different modules. This allows you to load components at runtime and keep the main codebase small. The available modules are:

    Reader
    Splitting the template reader from the main class has several advantages:

    Read templeates not only from file but from any datasource. Readers for files and strings have been implemented already.


    Read different template types. Currently patTemplate shippes with a reader that is able to read templates that have been created for PEAR's HTML_Template_IT. As PHPLib uses the same template format, it is also possible to work with templates created for the PHPLib templating system.



    Dump
    As the dump() functionality is split from the main engine, it increases performance.


    TemplateCache
    The TemplateCache will speed up your sites that are powered by patTemplate.


    InputFilter
    The input filters preprocess the templates before they are being read.


    OutputFilter
    The output filters postprocess the templates before they are sent to the browser.

    1.3 New Tags
    Besides the tmpl, sub and link tags, patTemplate now also provides the following tags:

    <patTemplate:var/>


    <patTemplate:comment/>

    1.4 Modulo Templates
    Modulo templates are similar to OddEven templates, but you may define how many different sub-templates you need.
    1.5 Flexible namespace
    It's possible to change the namespace of patTemplate, simply use the new method setNamespace()
    1.6 New features for variables
    patTemplate 3 introduces the <patTemplate:var/> tag that introduces new features like default values, modifiers and the ability to copy the value from any variable to a new one.
    Furthermore you may now pass a multi-dimensional array to patTemplate and the engine will add the variables in the array to the child-templates.
    1.7 Support for user-defined tags
    You may define any tag and register a PHP class that will create the HTML code that will be inserted. This allows you to include any functionality in your templates.
    1.8 Support for user-defined tags
    It is now possible to change the source of an external file at runtime. You'll have to add autoload="off" to the template and then use $tmpl->setAttribute( 'tmpl', 'src', 'myFile.tmpl' ) to change the file that should be included.
    1.9 Misc other features
    There are a lot of other features available, take a look at the examples or wait for the complete documentation.

    new built-in conditions __odd, __even, __first, __last, __default and __empty


    new attribute 'addSystemVars'


    it's possible to add variables before reading a template prepareTemplate( string tmpl ) must be called for that.


    external templates will be loaded when needed

    2. PHP-API
    Although patTemplate 3.0.0 is mostly backwards compatible, the API has changed in some places:
    patTemplate::addObject( string template, object obj [, string prefix] )
    This allows you to add any PHP object to a template. In the template, all properties of the object are available as template variables. Optionally it is possible to specify a prefix.
    patTemplate::parseIntoVar()
    Implements some kind of internal buffer for templates, that allows you to assign the result of a template to a variable.
    patTemplate::setNamespace( string namespace )
    Allows you to change the namespace for the patTemplate tags.
    patTemplate::readTemplatesFromInput( string input [, string reader] )
    replaces the deprecated readtemplatesFromFile().
    patTemplate::setRoot( string root )
    replaces the deprecated setBasedir().
     
  6. 小叶

    小叶 New Member

    注册:
    2005-09-04
    帖子:
    17,941
    赞:
    33
     
  7. 相当

    相当 New Member

    注册:
    2006-03-28
    帖子:
    9,431
    赞:
    42
    axgle
    算是一个很有激情的人

    我觉得他以后必是大材

    窝窝最近又不知道搞什么了哦

    总的来说还是没有一个是完美滴 哈
     
  8. sonic366

    sonic366 New Member

    注册:
    2006-02-23
    帖子:
    7
    赞:
    0
    窝窝最近又不知道搞什么了哦
     
  9. asff

    asff New Member

    注册:
    2006-05-10
    帖子:
    24
    赞:
    1
    都是E文,看不懂