PHP XTemplate

What is XTemplate?
PHP XTemplate is a cool templating engine for PHP.
XTemplate allows you to store your HTML code separately from your PHP code (as opposed to compiling your template into PHP as per Smarty etc.). It has many useful features such as nested blocks and various kinds of variable interpolation, and yet the code is very short and very optimized.
XTemplate has been around for several years, it is considered stable and mature and has been used in many projects, from personal to larger commercial and open source ones. If you'd like to get involved in helping out, see XTemplateContributions, otherwise please feel free to browse the site or get straight on with the downloads.
Latest News
- 17/09/2008: It's been a while since a public update, however the latest version is in SubVersion now:
- Big changes to tag callback regex - much improved
- change in constructor - now pass in an array of options
- assign objects as well as arrays
- _pre_var_dump made protected instead of private
- new protected method _ob_var_dump
- 16/08/2007: A couple of SubVersion code updates committed today including:
- Re-factored tag callback code - improved functionality:
- Now can call {tag|callback1} {tag|callback2} {tag|callback1#With a comment} to get different output for each (thanks again for the feedback Oliver)
- Further fix for $_SESSION being empty when used with XTemplate::scan_globals() - monitor & feedback if you experience side-effects
- Added XTemplate::comment_delim defaults to '#'
- Added XTemplate::callback_delim defaults to '|'
- Tag callback functions - improve security (thanks Oliver):
- Added XTemplate::allow_callbacks property (boolean) to allow switching functionality off
- Added XTemplate::allowed_callbacks (array) to limit functions available from templates
- Callbacks now only available for methods of subclasses of XTemplate or as functions in XTemplate::allowed_callbacks array
- 05/08/2007: Refactored website layout, ready for some updates and opened discussion forums.
Older news can be found on the NewsArchive page
Latest Release
Version 0.4.0 is the current release available for both PHP 5 and PHP 4.
SourceForge.net: Project Summary: PHP XTemplate (xtpl project)
- Project name: PHP XTemplate
Project description: XTemplate is a template engine for PHP that allows you to store your HTML code separately to your PHP code. It has many useful features yet code is short and highly optimized. The code is stored here but eveything else is on http://www.phpxtemplate.org/ - Developers on project: 2
Project administrators: cocomp - Downloadable files: total downloads to date
- Discussion forums (public): 0, containing messages
Public discussion forums:
We use Wikka:HomePage WikkaWiki
This site is running on version n/a (see WikkaReleaseNotes).
Useful pages: FormattingRules, WikkaDocumentation, OrphanedPages, WantedPages, TextSearch.
This site is running on version n/a (see WikkaReleaseNotes).
Useful pages: FormattingRules, WikkaDocumentation, OrphanedPages, WantedPages, TextSearch.