Skip to content

Releases: jyoungblood/slime-render

1.3.2

01 Nov 21:50
Compare
Choose a tag to compare

Add new alt method for rendering a HBS template as raw HTML (instead of PSR-7 response)

1.3.1

20 Apr 22:27
Compare
Choose a tag to compare
  • use FLAG_HANDLEBARS compiler alias for correct HBS behavior (h/t LightnCandy #288)

1.3.0

08 Apr 17:16
Compare
Choose a tag to compare

A few breaking changes in this release, but it's all good:

  • BREAKING - Removed Twig support (it was helpful in the beginning, but I believe it's superfluous now...if this upsets you, open an issue and I'll add it back 🙂)
  • BREAKING - Changed how the optional HTTP status codes are declared (now consistently in a separate (and optional) parameter after all arguments/content). Affected functions:
    • ::hbs()
    • ::json()
    • ::redirect()
  • BREAKING - ::redirect() and ::json() functions no longer expect content (redirect location string and payload data, respectively) to be in an array with a specified parameter, just pass the content as the argument
  • Handlebars templates automatically detect PHP $_GET and $_POST variables
  • Updated HBS date helper to convert a string date to unix time using an optional convert parameter

1.2.1

24 Mar 00:35
Compare
Choose a tag to compare

New functions!

  • Added html method to render a string as html response
  • Added text method to render a string as plain text response

1.2.0

17 Jan 20:52
Compare
Choose a tag to compare
  • Added new function: render::redirect()
  • Added default custom Handlebars helpers (date and #is)
  • Added new function: render::initialize_handlebars_helpers() - to register default custom Handlebars helpers
  • Removed superfluous namespace references

1.1.0

25 May 22:24
Compare
Choose a tag to compare
  • Set default variables for template path & extension
  • Now using isset() to check for parameters (kills PHP warnings)

1.0.0

20 May 15:28
Compare
Choose a tag to compare

Debugged, tested, and ready for prime time 😎

0.1.0

06 May 16:06
Compare
Choose a tag to compare

Emerging from the ether fully-formed, these functions are ready for use.

I wrote similar rendering functions a long time ago (as part of the STEREO internet toolkit), and have been using them for years. This method of template rendering has helped me get a lot done and make a decent amount of money over the years, and I figured it was time to make actual packages that can work with updated template engines and a "real" framework.

Enjoy!