📜 ⬆️ ⬇️

Is life possible without a template engine?

The correct answer is yes, easy!

Almost always describing the device CleverStyle CMS someone had a question, but how to customize the appearance, because there are no templates.
I must admit, I was a little crafty, saying that the appearance can be changed using CSS. You can change something, but not drastically.
There was no template engine as it was not, and it is not even planned. Instead, BananaHTML is used to generate simple HTML, and the interface itself falls on the shoulders of web components and Polymer in particular.

How did I get to this life


For various reasons, template engines have always disliked me. In this regard, CleverStyle CMS has a concept of a theme that is responsible for the overall look of the site, but there are no templates for individual pages.
Firstly, if you make templates for individual pages - you will not support various modules created by third-party developers, because standard templates will be used.
Secondly, templates do not make it so easy to inherit, and at the same time radically change the appearance if necessary (this is discussed later).

Premium Web Component Support


Web components appeared not so long ago, and there are quite a few nuances with their use, nevertheless, we managed to solve them.
In this connection, quite a lot of time was originally spent on understanding who was to blame - I, as a developer, polyfills, or third-party libraries in general.
It turned out that all were periodically to blame.
In the current version, CleverStyle CMS is probably the most reliable and therefore convenient environment for using web components.
The delivery (at the time of writing) includes patched versions:
')

Source: https://habr.com/ru/post/247617/


All Articles