About Template Engine Mustache

Mustache templates for the TemplateEngineFactory

Category Other Modules
Modules that have a unique purpose not covered by existing categories.
Release StateStable
Should be safe for use in production environments. *
Module Version1.0.0
Class NameTemplateEngineMustache
Date AddedJanuary 30, 2019
Recommended ByNew recommendations may take up to 1 day to appear.


This module's files should be placed in /site/modules/TemplateEngineMustache/
How to install or uninstall modules



ProcessWire module adding Mustache templates to the TemplateEngineFactory.


Install the module just like any other ProcessWire module. Check out the following guide: http://modules.processwire.com/install-uninstall/

This module requires TemplateEngineFactory: https://github.com/wanze/TemplateEngineFactory

After installing, don't forget to enable Mustache as engine in the TemplateEngineFactory module's settings.

Configuration (over TemplateEngineProcesswire Module Configuration)

  • Path to templates Path to folder where you want to store your Smarty template files.
  • Template files suffix The suffix of the template files, default is mustache.

Setting Helpers

  'myHelperFunction' => function($text) {
    return trim($text);


First expose data (in this case all story pages) to the mustache view being rendered next.

// In file: /site/templates/stories.php
$stories = $pages->find('template=blogstory');
$view->set('stories', $stories);

Then use the passed in data (story pages) in your mustache template file.

<!-- In file: /site/templates/views/stories.mustache -->

    <a href="{{url}}">


No comments yet. Be the first to post!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.