Home » HTML » HTML_Template_IT
Integrated Templates
This package is unmaintained.
Download latest release 1.3.3 (there might be newer Composer installable version)
License: BSD-3-Clause
Description
HTML_Template_IT is a templating engine designed to allow easy separation of concerns. It does this by clearly separating the presentational code from the PHP code. The presentation code may be of any format, however generally XML or HTML is used.
This engine works on the foundation of blocks and placeholders. It uses the hierarchy of blocks to determine which presentational code is instantiated when blocks are parsed. The placeholders allow the insertion of "dynamic" information.
There are two classes to use for templating. HTML_Template_IT is used for basic templating needs. HTML_Template_ITX gives you full power over the templating engine, allowing blocks to be added, and function callbacks to be used.
Documentation
Maintainers
- Mathieu Dubois (duboism) — lead, active
- Gregory Currie (gregorycu) — lead, inactive
- Pierre-Alain Joye (pajoye) — lead, inactive
- David Soria Parra (dsp) — lead, inactive
- Thorsten Rinne (thorstenr) — developer, inactive
- Ulf Wendel (uw) — developer, inactive
Dependencies
Required
- PHP (>= 4.0.0)
- PEAR Installer (>= 1.4.0b1)
Releases
- 1.3.3 (stable, 2025-12-14)
Release notes
License: BSD-3-Clause
- PR #19: Declare property blockparents
- PR #22: Add check_placeholder_exists option and setGlobalOptions method - 1.3.2 (stable, 2024-11-24)
Release notes
License: BSD-3-Clause
- PR #5: Support for PHP 7.2
- PR #9: Remove unused code
- PR #11: fix: Array and string offset access syntax with curly braces is no longer supported
- PR #12: Remove PHP under 5.6 and add last versions of PHP 7 - 1.3.1 (stable, 2018-01-22)
Release notes
License: BSD-3-Clause
- PR #2: Fixes for deprecated code
- 1.3.0 (stable, 2010-03-10)
Release notes
License: Modified BSD license
Changes since last stable release (1.2.1):
- Add support for pear package 2.0 format
- Remove support for pear package 1.0 format
- Fix bug #9501, doller signs disapear if preg_match is used.
- Fix bug #9783, don't remove variable which values follow the variable pattern
To allow backwards compatbility an option preserve_input is added.
If it is false, the old behaviour will be used and therefore those values will be deleted.
Default is true, so new behaviour.
- Fix bug #9853, problems with dots in placeholders or blocknames
- Fix bug #13935, docblock is wrong
- Fix bug #17129
- Add option 'preserve_input' to only remove unkown variable that were present
during setTemplate or loadTemplatefile
which is the behaviour before 1.3.0a1
- Improved PHPCS (Request #15039)
- Added unit tests
- Fixed unit tests - 1.3.0a3 (alpha, 2010-03-01)
Release notes
License: Modified BSD license
- Fix bug #17129
- Added unit test - 1.3.0a2 (alpha, 2010-02-16)
Release notes
License: Modified BSD license
Fixed unit tests
- 1.3.0a1 (alpha, 2008-12-27)
Release notes
License: Modified BSD license
- Add support for pear package 2.0 format
- Remove support for pear package 1.0 format
- Fix bug #9501, doller signs disapear if preg_match is used.
- Fix bug #9783, don't remove variable which values follow the variable pattern
To allow backwards compatbility an option preserve_input is added.
If it is false, the old behaviour will be used and therefore those values will be deleted.
Default is true, so new behaviour.
- Fix bug #9853, problems with dots in placeholders or blocknames
- Add option 'preserve_input' to only remove unkown variable that were present during setTemplate or lodaTemplatefile
which is the behaviour before 1.3.0a1
- Fix bug #13935 - docblock is wrong
- Improved PHPCS (Request #15039) - 1.2.1 (stable, 2006-08-25)
Release notes
License: Modified BSD license
- Deprecate $callbackobject parameter in setCallbackFunction
- Introduce $expandCallbackParameters parameter to setCallbackFunction to support
callbacks that expect to get the parameters in a regular way, not as an array
- #7651, allow dots in placeholder and block names
- #7611, wrong array initialized, the same object cannot be
used for multiple templates - 1.2.0 (beta, 2006-08-17)
Release notes
License: Modified BSD license
- Deprecate $callbackobject parameter in setCallbackFunction
- Introduce $expandCallbackParameters parameter to setCallbackFunction to support
callbacks that expect to get the parameters in a regular way, not as an array
- #7651, allow dots in placeholder and block names - 1.1.4 (stable, 2006-04-11)
Release notes
License: Modified BSD license
- #6084, fread raises warning when used with empty files
- #7359, remove notices when a block is not yet defined
- fix a bug introduced with some cleanup commit, in some cases,
callbacks did not work anymore - 1.1.3 (stable, 2005-11-01)
Release notes
License: Modified BSD license
- Change to the new BSD License
(see http://www.opensource.org/licenses/bsd-license.php) - 1.1.2 (stable, 2005-10-28)
- 1.1.1 (stable, 2005-08-20)
Release notes
License: Modified BSD license
- fix #4590, case sensitive method name getFile fix
- fix #1453, haltOnWarning fix, wrong property name called
- fix #3952, return IT_OK on success in setOptions - 1.1 (stable, 2003-03-12)
Release notes
License: Modified BSD license
*BETA* release.
- 1.0.0 (stable, 2002-09-13)
- 1.0 (beta, 2002-09-01)
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #50 | Bogus | Bug | 2003-09-30 | dollar sign parse bug | |
| #139 | Bogus | Bug | 2003-10-22 | Problems creating dynamic javascript reqular expressions | |
| #192 | Bogus | Bug | 2003-11-04 | No replacements = no output | |
| #304 | Wont fix | Bug | 2003-11-27 | Feature Request: template file in include_path | |
| #1096 | Bogus | Bug | 2004-03-30 | about '$" | |
| #1177 | Closed | Bug | 2004-04-10 | missing (but semi-documented) hideBlock method | |
| #1183 | Wont fix | Bug | 2004-04-12 | It's in wrong category in pear, it is not anyway limited to use only with HTML | |
| #1453 | Closed | Bug | 2004-05-20 | confused flag $haltOnWarning in ITX | |
| #1474 | No Feedback | Bug | 2004-05-22 | Cannot find this block 'blockname' always true | |
| #1901 | Bogus | Bug | 2004-07-17 | Paranthess { } lost... | |
| #2040 | Bogus | Bug | 2004-08-01 | $n in variable values swallowed | |
| #2683 | Bogus | Req | 2004-11-03 | Can not parse templates containing no placeholders/blocks | |
| #2833 | Closed | Bug | 2004-11-26 | addBlockFile() bad Parameters documentation info | |
| #3652 | Bogus | Bug | 2005-02-28 | Templates eat expressions in variable values that are enclosed in braces. | |
| #3686 | Bogus | Bug | 2005-03-03 | Wrong parsing with \ in values | |
| #3952 | Closed | Bug | 2005-03-24 | HTML_Template_IT::setOptions() does not return IT_OK on success | |
| #4392 | Bogus | Bug | 2005-05-20 | truncate $[0-99] in the Variable?! | |
| #4590 | Closed | Bug | 2005-06-14 | HTML_Template_IT::getfile doesn't exist | |
| #4699 | Bogus | Bug | 2005-06-29 | Needs to mention backslash-output behaviour | |
| #4759 | Bogus | Bug | 2005-07-06 | $ [output error] | |
| #5092 | Bogus | Req | 2005-08-14 | Bad: HTML_Template_IT::setOptions() 2x return | |
| #5171 | Closed | Bug | 2005-08-21 | Missing package file | |
| #5642 | Closed | Bug | 2005-10-10 | Undefined variable: blockname | |
| #5774 | Closed | Bug | 2005-10-25 | HTML_Template_ITX->buildFunctionlist | |
| #6084 | Closed | Bug | 2005-11-26 | fread now gives a warning on zero length templates | |
| #6160 | No Feedback | Bug | 2005-12-05 | unused vars in __global__ removes the block | |
| #6929 | No Feedback | Bug | 1.1.3 | 2006-02-24 | Some nested blocks do not parse correctly |
| #7179 | Bogus | Bug | 1.1.3 | 2006-03-22 | Backslashes will not printed out correctly |
| #7278 | Bogus | Bug | 1.1.3 | 2006-04-02 | parse-problem |
| #7359 | Closed | Bug | 1.1.3 | 2006-04-10 | - |
| #7460 | Bogus | Bug | 1.1.4 | 2006-04-23 | PHP notice |
| #7611 | Closed | Bug | 1.1.4 | 2006-05-12 | Typo in IT.php |
| #7651 | Closed | Req | CVS | 2006-05-17 | Allow dot separated variables and blocks |
| #7962 | Bogus | Bug | 1.1.4 | 2006-06-22 | $[0-9][0-9] in replacements get lost |
| #8255 | Bogus | Bug | 1.1.4 | 2006-07-20 | Outer variables parse problem after parsing nested |
| #9397 | Bogus | Bug | 1.2.1 | 2006-11-20 | getFile() using fread() does not read whole file |
| #9501 | Closed | Bug | 1.2.1 | 2006-11-29 | incorrect parsing of string literal with setVariable() |
| #9577 | Bogus | Req | 1.2.1 | 2006-12-07 | Nested Variable Tags |
| #9753 | Wont fix | Req | 1.2.1 | 2007-01-05 | Template rendering fails silently if invalid root supplied |
| #9783 | Closed | Bug | 1.2.1 | 2007-01-09 | some words between "{" and "}" are missing displayed! |
| #9853 | Closed | Bug | 1.2.1 | 2007-01-17 | problems with dot in blockname |
| #10050 | Closed | Bug | 1.2.1 | 2007-02-07 | Touched blocks do not respect removeUnknownVariables |
| #10101 | Closed | Bug | 1.2.1 | 2007-02-14 | Unknown Variables are not always removed |
| #10120 | Bogus | Req | 1.2.1 | 2007-02-18 | I need add comment feathre |
| #11468 | Bogus | Req | 1.2.1 | 2007-06-28 | Need PHP5 complaint Class |
| #12095 | No Feedback | Bug | 1.2.1 | 2007-09-21 | Doesn't cope with plain templates |
| #12813 | Assigned | Req | 1.2.1 | 2008-01-02 | Make setOption() useful, or provide accessors |
| #13364 | No Feedback | Bug | 1.2.1 | 2008-03-10 | Example code does not produce expected results? |
| #13935 | Closed | Doc | 1.2.1 | 2008-05-18 | Possible Typing Error |
| #14097 | No Feedback | Bug | 1.2.1 | 2008-06-06 | Multiple INCLUDE on one line don't work -- wrong RegExp |
| #15039 | Closed | Req | CVS | 2008-11-14 | PHPCS: A TOTAL OF 1 ERROR(S) AND 31 WARNING(S) WERE FOUND IN 2 FILE(S) |
| #17129 | Closed | Bug | 1.3.0a2 | 2010-02-18 | Superfluous placeholder replacement |
| #17329 | Bogus | Bug | 1.3.0 | 2010-04-20 | IT doesn't set variables outside blocks after blocks got parsed |
| #17877 | Verified | Bug | 1.3.0 | 2010-09-20 | Not always replacing placeholders in added blocktemplates |
| #20571 | Open | Bug | 1.3.0 | 2015-07-14 | ITX function call in block |
| #20956 | Closed | Bug | 1.3.0 | 2015-10-01 | preg_replace(): The /e modifier is deprecated |
| #21056 | Open | Doc | 1.3.0 | 2016-04-22 | Minor fault in Introduction |
| #21192 | Duplicate | Bug | 1.3.0 | 2017-03-07 | Deprecated Call to preg_replace with 'e' flag in function getFile |
| #23764 | Open | Bug | 1.3.1 | 2018-09-02 | Contains deprecated each() |