Wiki source for AdvancedDocumentation


Show raw source

====XTemplate Advanced Documentation====
{{lastedit show="3"}}

If you're just starting out with XTemplate, [[DocumentationBasics try here first]]

==Table Rows==
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: [[http://www.phpxtemplate.org/XTemplate/ex8.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex8.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex8.xtpl.txt Template]]

==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: [[http://www.phpxtemplate.org/XTemplate/ex9.php Example file output]], then see the [[http://www.phpxtemplate.org/XTemplate/ex9.phps PHP Source]] and finally the [[http://www.phpxtemplate.org/XTemplate/ex9.xtpl.txt Template]] file.

== XTemplate & ZendFramework==
You can find details of how to use XTemplate with the ZendFramework here: [[ZendFrameworkMVCExample Zend Framework MVC Example]]

----
CategoryXTemplateDocumentation
XTemplateDocumentation
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki