PHP code example of giggleboxstudios / dispatch-handlebars
1. Go to this page and download the library: Download giggleboxstudios/dispatch-handlebars library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
giggleboxstudios / dispatch-handlebars example snippets
// main layout template file; must contain `{{{content}}}` in <body>
config('handlebars.layout') = 'layout';
// set location of .handlbars templates (views and partials)
config('handlebars.views') = 'path/to/tempaltes';
// set character encoding for template files; defaults to `UTF-8`
config('handlebars.charset') = 'utf-8';
// prefix string to determine partial files, defaults to `_` (underscore)
config('handlebars.partial_prefix') = '_';
// [associative array](http://www.php.net/manual/en/language.types.array.php) of tagname and function names
config('handlebars.helpers') = array('tagName' => 'callback_function');
// path where compiled templates will be cached (this feature does not work yet)
config('handlebars.cache') = 'path/to/cached/tempaltes';