https://github.com/flowpack/mustache
Opinionated Mustache template Fusion object
https://github.com/flowpack/mustache
Last synced: 3 months ago
JSON representation
Opinionated Mustache template Fusion object
- Host: GitHub
- URL: https://github.com/flowpack/mustache
- Owner: Flowpack
- License: gpl-3.0
- Created: 2017-05-31T09:00:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-12-31T09:36:12.000Z (about 5 years ago)
- Last Synced: 2025-02-14T17:22:23.489Z (about 1 year ago)
- Language: PHP
- Size: 15.6 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flowpack.Mustache
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'
}
```
3. Place a Mustache template into `Packages/Sites/Your.Site/Resources/Private/Fusion/Hello/Hello.html`. E.g. `Hello, {{planet}}`
4. 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