Most recent edit on 2007-08-16 22:39:29 by JeremyCoates [Added Tag Callback Functions]
Additions:
Tag Callback Functions
A new (powerful) feature of XTemplate is Tag Callbacks. They essentially allow you to call PHP functions/methods from within a tag in your templates. This (slightly) moves some intelligence into the template, but it's quite useful non-the-less. For full examples read: Example file output∞, then see the PHP Source∞ and finally the Template∞ file.
Edited on 2007-08-14 03:04:44 by JeremyCoates
Deletions:
Tag Callbacks
When using tag callbacks feature e.g. {mytag|my_callback} if you repeat the tag within the same block (with or without a different callback method), you will get the first tags callback results throughout the block. You have to parse the block to (auto)reset the tag to be able to update it's contents again.
Edited on 2007-08-14 00:08:25 by JeremyCoates [Tag callback info]
Additions:
Table Rows
Tag Callbacks
When using tag callbacks feature e.g. {mytag|my_callback} if you repeat the tag within the same block (with or without a different callback method), you will get the first tags callback results throughout the block. You have to parse the block to (auto)reset the tag to be able to update it's contents again.
Edited on 2007-05-29 19:23:15 by JeremyCoates [Updated file links]
Additions:
One thing often asked about XTemplate is how to do accurate table rows (or similar rows and columns type output) using nested loops. Common symptoms of the wrong approach include an an extra (empty) row or an omitted final result. An example showing one solution is here: Output∞ PHP Source∞ Template∞
Deletions:
One thing often asked about XTemplate is how to do accurate table rows (or similar rows and columns type output) using nested loops. Common symptoms of the wrong approach include an an extra (empty) row or an omitted final result. An example showing one solution is here: Output∞ PHP Source∞ Template∞
Edited on 2006-12-27 09:18:48 by JeremyCoates [Added Table Row (Nested Loops) example]
Additions:
One thing often asked about XTemplate is how to do accurate table rows (or similar rows and columns type output) using nested loops. Common symptoms of the wrong approach include an an extra (empty) row or an omitted final result. An example showing one solution is here: Output∞ PHP Source∞ Template∞
Edited on 2006-06-30 19:04:23 by JeremyCoates
Additions:
You can find details of how to use XTemplate with the ZendFramework here: Zend Framework MVC Example
Deletions:
You can find details of how to use XTemplate with the Zend Framework here: Zend Framework MVC Example
Oldest known version of this page was edited on 2006-06-30 18:55:51 by JeremyCoates [Initial Edit]
Page view:
XTemplate Advanced Documentation
If you're just starting out with XTemplate,
try here first
You can find details of how to use XTemplate with the Zend Framework here:
Zend Framework MVC Example
CategoryXTemplateDocumentation
XTemplateDocumentation