Wiki source for DocumentationBasics


Show raw source

====Getting started with XTemplate====
{{lastedit show="3"}}
The first thing to note about XTemplate is that the download (or CVS) version comes with a number of example files that document the main features of XTemplate. For reference, they are listed here.

''Output'': The output that is sent to the browser
''PHP Source'': Colour coded php code required to produce the Output
''Template'': HTML that, along with the php code produces the Output

Example 1: Basic template functions - simple replace / dynamic blocks [[http://www.phpxtemplate.org/XTemplate/ex1.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex1.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex1.xtpl Template]]
Example 2: Multiple level dynamic blocks [[http://www.phpxtemplate.org/XTemplate/ex2.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex2.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex2.xtpl Template]]
Example 3: Auto reset [[http://www.phpxtemplate.org/XTemplate/ex3.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex3.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex3.xtpl Template]]
Example 4: Recursive parsing [[http://www.phpxtemplate.org/XTemplate/ex4.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex4.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex4.xtpl Template]]
Example 5: Null strings [[http://www.phpxtemplate.org/XTemplate/ex5.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex5.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex5.xtpl Template]]
Example 6: Null blocks [[http://www.phpxtemplate.org/XTemplate/ex6.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex6.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex6.xtpl Template]]
Example 7: File includes [[http://www.phpxtemplate.org/XTemplate/ex7.php Output]] [[http://www.phpxtemplate.org/XTemplate/ex7.phps PHP Source]] [[http://www.phpxtemplate.org/XTemplate/ex7.xtpl Template]] [[http://www.phpxtemplate.org/XTemplate/ex7-inc.xtpl Template include 1]] [[http://www.phpxtemplate.org/XTemplate/ex7-inc2.xtpl Template include 2]] [[http://www.phpxtemplate.org/XTemplate/ex7-inc-de.xtpl Template include German]] [[http://www.phpxtemplate.org/XTemplate/ex7-inc-eng.xtpl Template include English]]

For reference, a colour coded version of XTemplate is also available: [[http://www.phpxtemplate.org/XTemplate/xtemplate.class.phps XTemplate Class]]
There is also [[http://www.phpxtemplate.org/XTemplate/docs/ phpdoc output]] available.

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