flowpack/mustache

Mustache template Fusion object

Installs: 166

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 12

Forks: 0

Open Issues: 0

Type:neos-package

0.0.1 2020-05-05 17:55 UTC

This package is auto-updated.

Last update: 2024-09-29 05:49:02 UTC


README

Opinionated Mustache templates.

TL;DR

  1. composer require flowpack/mustache
  2. Inherit the Template object and set template variables as keys
prototype(Your.Site:Hello) < prototype(Flowpack.Mustache:Template) {
	planet = 'Earth'
}
  1. Place a Mustache template into Packages/Sites/Your.Site/Resources/Private/Fusion/Hello/Hello.html. E.g. Hello, {{planet}}

  2. Alternatively you can use it as an Eel helper, e.g. @process.params = ${Mustache.render('Hello, {{planet}}', {planet: 'Earth'})}. Useful for replacing some placeholders in content.

TODO: object access