PHPackages                             hypejunction/mustache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. hypejunction/mustache

ActiveElgg-plugin[Templating &amp; Views](/categories/templating)

hypejunction/mustache
=====================

Mustache templating in Elgg

1.0.0(10y ago)0711GPL-2.0JavaScript

Since Oct 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/hypeJunction/mustache)[ Packagist](https://packagist.org/packages/hypejunction/mustache)[ Docs](http://hypejunction.com)[ RSS](/packages/hypejunction-mustache/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (1)

Mustache templating for Elgg
============================

[](#mustache-templating-for-elgg)

[![Elgg 2.0](https://camo.githubusercontent.com/981b94044a74b931be93e2825c7151896de9c8a53ccb960daf01b8fe0d800774/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d322e302e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/981b94044a74b931be93e2825c7151896de9c8a53ccb960daf01b8fe0d800774/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d322e302e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)

Features
--------

[](#features)

- Templates can be rendered both client and server side
- Compatible with Elgg's view system
- AMD-friendly

Usage
-----

[](#usage)

1. Create a new template as an Elgg view

```
// /my_plugin/views/default/path/to/template.html

	Hello, {{name}}

```

You can also use PHP views, e.g. `template.html.php`. This allows you to call other views and do stuff with PHP. If you use this approach, be sure to register the template views in simplecache, so that they are accessible with AMD.

```
// /start.php
elgg_register_simplecache_view('path/to/template.html.php');
```

```
// /my_plugin/views/default/path/to/template.html.php

	Hello, {{name}}

```

2. Render server-side

```
	echo mustache()->render(elgg_view('mustache/template.html'), array(
		'name' => elgg_get_logged_in_user_entity()->name,
	));
```

3. Render client-side

```
define(function(require) {

	var elgg = require('elgg');
	var mustache = require('mustache');
	var template = require('text!mustache/template.html');

	var view = mustache.render(template, {
		name: elgg.get_logged_in_user_entity().name
	});

	$('body').html(view);

});
```

Docs
----

[](#docs)

- mustache.js
- PHP Mustache

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3917d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5071b1cd852e094b3f564962a625e04c227adc73af30c5b46b243ab8f20154a7?d=identicon)[hypeJunction](/maintainers/hypeJunction)

---

Top Contributors

[![hypeJunction](https://avatars.githubusercontent.com/u/1202761?v=4)](https://github.com/hypeJunction "hypeJunction (1 commits)")

---

Tags

pluginelggmustachetemplates

### Embed Badge

![Health badge](/badges/hypejunction-mustache/health.svg)

```
[![Health](https://phpackages.com/badges/hypejunction-mustache/health.svg)](https://phpackages.com/packages/hypejunction-mustache)
```

###  Alternatives

[maiconpinto/cakephp-adminlte-theme

CakePHP 4.x AdminLTE Theme.

171163.7k7](/packages/maiconpinto-cakephp-adminlte-theme)[shoot/shoot

Shoot aims to make providing data to your templates more manageable

40229.9k2](/packages/shoot-shoot)[wrklst/docxmustache

docx template manipulation class, based on mustache templating language

578.3k](/packages/wrklst-docxmustache)[backstageel/cakephp-gentelella-theme

CakePHP 3.x Gentelella Theme.

447.8k1](/packages/backstageel-cakephp-gentelella-theme)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
