Templo is the advanced template system for Haxe. Since version 2.0 it is no longer part of mtwin libraries. You can currently see examples of its usage in the v1.0 documentation: http://www.haxe.org/com/libs/mtwin/templo

Templo2 provides templating for both neko and php targets.


  • do a "haxelib install templo"
  • then, "haxelib run templo" in order to form the temploc2 executable, the templo compiler temploc2 will placed in the current directory
    On windows, it works fine to put the temploc2.exe in the haxe directory, typically C:\Motion-Twin\haxe\temploc2.exe or C:\Motion-Twin\Program Files\haxe\temploc2.exe
    On linux, it works fine to put the temploc2 in the /usr/bin/ directory.


  • use commands as mentioned below, to compile your .mtt template files (eg. "temploc2 -output bin\php -php
    test.mtt", etc ), making sure temploc2 is in your PATH.
  • for php, the resulting file will look like: test.mtt.php.
  • now place these pre-compiled template files where they can be
    accessed by your script

Usage : temploc [options] <files>
-cp <dir> : add file search path
-output <dir> : specify output directory
-macros <file> : add macro definition file
-php : use php output
-debug : use debug mode
-xml : don't use XHTML checks
-compare <file1@file2> : compare two files or directories structurally
-compare-xml <config> : compare also XML files
--compare-both : display both files position in comparisons

version #15551, modified 2012-10-12 10:42:14 by cambiata