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