TNT: Trigger Node Template system for php 4 or 5. Available at http://members.shaw.ca/malcolm.dewjones/TriggerNodeTemplate/ look for TriggerNodeTemplate-x.x.zip Documentation is included, but is also available on-line. http://members.shaw.ca/malcolm.dewjones/TriggerNodeTemplate/TriggerNodeTemplate.html FEATURES Tnt is a full featured template system for php 4 and 5, with variables and control structures, but due to its unique design it is also tiny, simple, flexible, and speedy. The key features of tnt are: Flexible, unique control structure. Tnt provides the most flexible type of control structure possible by providing no control structures at all. Instead tnt simply maps named regions of templates, called components, into logic handlers that your program provides. Logic handlers all use the same simple but flexible interface, while allowing you to program your template logic in whatever manner is most appropriate for your program. Speed Templates are compiled into php code. Therefore, depending on your setup, there is little or even no additional overhead for using these templates in an application. Simplicity Since the template system does very little except map named regions into logic routines, all of which use the same basic interface, the template language is very simple. XML Templates are written in XML (i.e. they are parsed using the php XML routines). This allows a simple but robust, well documented, and speedy parsing strategy. HTML Templates can be written in HTML by being careful that the HTML is valid XML. This does not mean HTML, it simply means correct balancing of tags, and correct quoting of attribute values. Some "kludge" options are provided that may allow for less strictly formatted files. Components can nest, can be called (even recursively), and can be used to build "visual subroutines". Components can be nested within each other. Components can also be used as "visual subroutines", i.e. defined as a visual element in one location within a template but invoked from another location, or from within your main program. Components can be recursively invoked to create complex nested structures. Multiple templates possible. A program can use multiple templates, and templates can refer to each other. The restriction is that the class names defined must not clash. (But this restriction is no different that in any other multi file php project.) Variables and parameters. Components can have parameters and variables. Variables can be made visible to nested components. Macros The syntax {+ value +} is used for macros. A macro displays the value in the macro. Macros are used to access the component's variables or any other php code that returns a value. Because a macro does not use XML tagging notation then they are visible to tools such as a browser while the template is being setup. INSTALL 1) Download the zip file. http://members.shaw.ca/malcolm.dewjones/TriggerNodeTemplate/TriggerNodeTemplate-x.x.zip Note: x.x will vary, e.g. 0.2 etc. 2) Unzip the contents. unzip TriggerNodeTemplate-x.x.zip Note: Files are in Unix text format. You can unzip using "-aa" to save them using some other text format. Type "unzip" for details. 3) Copy the files into any suitable location on disk. copy tnt.php your-application-directory copy tnt-compiler.php your-application-directory copy TriggerNodeTemplate.html where-ever-you-keep-programmer-documentation type 00-README.txt delete 00-README.txt Note: those are just pseudo commands, use the appropriate commands for your system. DOCUMENTATION TriggerNodeTemplate.html -- included in the zip. AUTHOR Malcolm Dew-Jones. Mail to - look me up on google to get an address. LICENSE and COPYRIGHT Copyright 2009 Malcolm Dew-Jones License is the Lesser GPL.