Mustache templates for the ProcessWire TemplateEngineFactory
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


ProcessWire module adding Mustache templates to the TemplateEngineFactory.


Install the module just like any other ProcessWire module. Check out the following guide:

This module requires 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}}">