cakephp-templating

A plugin for templating in CakePHP with HTML value objects, font-icons and useful helpers

MIT License

Downloads
5K
Stars
2
cakephp-templating - 0.2.6

Published by dereuromark 5 days ago

Improvements

Backend added

If routes are enabled, you should be able to navigate to

/admin/templating/icons

and see all your custom (mapped) icons, as well as the icons available.
You can also check the full icon sets available (namespaced ones).

It can also show you possible conflicts (same icon in different sets, here the defined order matters).
For conflicting ones you can use aliasing through the map - or directly use the verbose set:name syntax where the "other one" is needed.

Icon::render()

Aliasing now works by default for all icons that are not conflicting. On conflicts it will use the first one defined in your config.
The order now is as follows:

  • map (custom aliasing)
  • primary set
  • other sets

See the new backend for details.

It also now allows custom title attribute key via titleField in options, and uses BC title option from previous icon helper functionality (with deprecation note). You should be using arguments (3rd param) for title.

cakephp-templating - 0.2.5 Latest Release

Published by dereuromark 5 months ago

Fixes

Allow FA5 to also use alternative JSON metadata

Included commits: https://github.com/dereuromark/cakephp-templating/compare/0.2.4...0.2.5

cakephp-templating - 0.2.4

Published by dereuromark 7 months ago

cakephp-templating - 0.2.3

Published by dereuromark 8 months ago

Improvements

FontAwesome v6 icons can now be read from different types of files.
JSON type has the greatest advantage of also providing aliases by default.
They are now also only pulled for the type (solid, regular, ...) configured.

cakephp-templating - 0.2.2

Published by dereuromark 8 months ago

Improvements

Add Templating helper with

  • warning()
  • ok()

convenience methods to color the text according to a boolean result/value

cakephp-templating - 0.2.1

Published by dereuromark 8 months ago

Improvements

Added `HtmlHelper::string() convenience method:

The Html helper can now directly be used to create Html value objects

$html = $this->Html->string('<i>text</i>');
$this->Html->link($html, '/my/url');
cakephp-templating - 0.2.0

Published by dereuromark 11 months ago

Improvements

API changes

Moved value object Html and the trait HtmlStringable one level up:

-use Templating\View\Html\Html;
-use Templating\View\Html\HtmlStringable;
+use Templating\View\Html;
+use Templating\View\HtmlStringable;

Renamed helper traits

-use Templating\View\Helper\HtmlTrait;
-use Templating\View\Helper\FormTrait;
+use Templating\View\Helper\HtmlHelperTrait;
+use Templating\View\Helper\FormHelperTrait;

Added serialization support

The value objects should be safe for serialization using PHP native serialize() as well as
json_encode(). As such they should work fine with caching and other forms of transportation
(e.g. API) through different layers.

cakephp-templating - 0.1.2

Published by dereuromark 11 months ago

Improvements

Added Html value object as convenience wrapper in general:

use Templating\View\Html\Html;

$html = Html::create('<i>text</i>');
$this->Html->link($html, '/my/url');
cakephp-templating - 0.1.1

Published by dereuromark 11 months ago

Fixes

Use strict_types enabled to make the API more clean.

cakephp-templating - 0.1.0

Published by dereuromark 11 months ago

Initial Pre-Release

Migrating this over from Tools plugin with additional

  • HtmlStringable behavior
  • returns the value object and can more easily control escapeTitle behavior this way

IDE autocomplete included using IdeHelper plugin.