sparkartgroup / handlebars-helper

A collection of Handlebars Helpers for use with Solidus
MIT License
39 stars 9 forks source link

Add `global` helper #21

Open Fauntleroy opened 10 years ago

Fauntleroy commented 10 years ago

We could probably use a helper to provide access to variables that are out of the current scope. Since we usually need to just access something at the top of the current context, a simple global helper would do the trick.

<img src="{{global "url.host"}}/images/banners/approach.jpg" />

Inspired by this SO issue: http://stackoverflow.com/questions/18856023/handlebars-js-global-contexts