[ Home | Main Table Of Contents | Table Of Contents | Keyword Index ]
mustache::render - Mustache - Rendering parsed templates
package require mustache::render
Welcome to the Mustache project for Tcl, written by Andreas Kupries.
It provides a set of five related Tcl packages for the parsing and rendering of mustache-style logic-less templates, plus an application for easy command-line access to the functionality.
For availability please read Mustache - How To Get The Sources.
The package mustache::render provides the renderer for mustache templates.
This command takes the data structure representing a parsed mustache template (as generated by the mustache parse command provided by package mustache::parse), a context as the source of the data to interpolate, and a writer representing the destination of the interpolation result.
Both context and writer are command prefixes. Both will be invoked in arbitrarly deeply nested scopes of the rendering operation.
The context command prefix has to support the instance API of mustache::context objects.
The writer command prefix has to accept a single argument, the text to print. Note that it may be invoked multiple times as the template is rendered.
Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Mustache Tracker.
Please also report any ideas you may have for enhancements of either package(s) and/or documentation.
Copyright © 2019-2021 Andreas Kupries
Copyright © 2019-2021 Documentation, Andreas Kupries