Skip to content

Overview

The Templating plugin for CakePHP makes working with HTML and view helpers more convenient and ships a powerful, unified way to render (font) icons from a range of popular libraries.

It helps you to:

  • make working with HTML and helpers more convenient,
  • provide (font) icons from various libraries out of the box,
  • and, together with the IdeHelper plugin, get auto-complete on those icons.

CakePHP version

This documentation is for the branch that supports CakePHP 5.1+. See the version map for older releases.

Supported icon sets

You can use one or many of the following icon sets out of the box:

You can also add your own custom icon set.

The pieces

ConceptResponsibility
Icon helperRenders icons from any configured set, in font or SVG mode.
IconSnippet helperConvenience wrappers for common icon snippets (yes/no, thumbs, neighbors).
Templating helperColored status output (ok(), warning(), yesNo()).
Html helperEnhanced HtmlHelper with automatic HtmlStringable support.
Form helperEnhanced FormHelper with automatic HtmlStringable support.
HtmlStringableA marker contract for value objects that carry already-safe HTML.

Next steps

Demo

A live demo of the helpers is available at sandbox.dereuromark.de/sandbox/templating-examples.

Released under the MIT License.