Mustache is a framework-agnostic templating system that enforces separation of view logic from the template file.
This templating engine has made it possible to not even be possible to embed logic in a template.
This allows templates to be reused across language boundaries and for other language independent uses.
Working with Mustache means dealing with templates, views, and contexts.
Templates contain HTML (or some other format) and Mustache tags that specify what data to pull in. A template can be either a string or a file (usually ending in .mustache).
Views are Erlang modules that can define functions that are called and provide the data for the template tags. A context is an Erlang dict that contains the current context from which tags can pull data.
Mustache is also available in:
JavaScript - download mustache.js here
Ruby - download Mustache here.
Python - download pystache here.
Erlang - download mustache.erl here.
PHP - download mustache.php here.
Perl - download Mustache Template here.
Go - download mustache.go here.
Lua - download hige here.
ooc - download Mustang here.
C++ - download plustache here.
ActionScript 3 - download mustache.as here.
Java - download mustache.java here.
node.js - download Mu here.
Features:
- Compiled Templates (for speed)
- The Power of Context
- Tag Types
- Variables
- Boolean Sections
- List Sections
- Comments
Comments not found