Download the PHP package giggleboxstudios/dispatch-handlebars without Composer

On this page you can find all versions of the php package giggleboxstudios/dispatch-handlebars. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dispatch-handlebars

{{handlebars}} for Dispatch

An extension for the Dispatch PHP micro-framework that provides support for Handlebars templates.

Requires:

Installation

This repo assumes you know how to install dependencies via Composer

composer.json:

Open a new terminal to your working directory and composer install or composer update.

Configuration

your-main-app-file.php

NOTE: If you do not define handlebars.layout and handlebars.views, handlebars will use the default dispatch.layout and dispatch.views values instead.

Using Handlebars with Dispatch

layout.handlebars:

homepage.handlebars:

In our example index.php file, we'll use the handlebars() function to render our template within our route:

index.php

The handlebars() function accepts three arguments:

The resulting HTML from our demo above renders something like this:

Extending Handlebars with Helpers

To define helpers for Handlebars, you need to define the functions you wish to use and pass them into the handlebars.helpers array as defined above.

example:

In handlebars.helpers, the key is the tag name that gets used in your handlebars templates, and the value is the name of the callback function we want to use when that helper is defined.

Read more about defining helpers at mardix/Handlebars

Credits

This package was written by Brandtley McMinn and is largely based on the Dispatch-Mustache package written by Jesus A. Domingo as an add-on for the Dispatch PHP micro-framework.

It depends on the Handlebars PHP library by fzerorubigd and Behrooz Shabani aka everplays.

LICENSE

MIT http://brandtleymcminn.mit-license.org/


All versions of dispatch-handlebars with dependencies

PHP Build Version
Package Version
Requires php Version >= 5.4.0
dispatch/dispatch Version >= 2.6.2
xamin/handlebars.php Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package giggleboxstudios/dispatch-handlebars contains the following files

Loading the files please wait ....