Symfony Twig is a PHP templating engine, which has pretty much become the standard way that PHP applications do templating. I’ve used it in other projects, and find it pretty cool.
Known uses its own PHP templating language… or rather, it uses PHP. But, I thought it would be useful if Known could support both.
So, in the latest build, as well as .tpl.php Bonita template files, you can also create .html.twig files. These work in pretty much the same way, with the same hierarchy, but provide a more “standard” way of doing things.
I don’t imagine Bonita going anywhere any time soon, but I will probably be moving more and more stuff to twig going forward.
In my mind, one of the important milestones in our long march towards Known 1.0, was to allow allow Known settings and admin pages to have their own template.
It was not uncommon for themes or plugins to get a little broken, and in some cases this caused Known’s admin page to break. A bad time all round.
So, a recent patch makes it so that these special pages can now have their own templates, which will make Known framework sites much more robust.
As a side effect of this, I’ve introduced a mechanism in the template system for code to specify a different page shell for a url hierarchy. So, for example, by using \Idno\Core\Idno::site()->template()->addUrlShellOverride('/foo/', 'foo-shell') you can specify that anything under ‘/foo/’ would use shell ‘foo-shell’, automatically.
More tweaks to come, I’m sure, but so far it looks like this…