What does "engine" mean in Drupal Theming?

I read about the functions and functions of the Drupal preprocess and noticed that they are listed by engineName_engine_preprocess and engineName_engine_preprocess_hook in the order in which the preprocessor functions are executed, but I'm not quite sure what the engine layer is? I understand the core of the kernel, includes modules and themes.

Many thanks

+3
source share
2 answers

The engine is the template engine used. By default, Drupal uses a mechanism PHPTemplate, but you can use other template mechanisms and, thus, create various preprocessor interceptors based on the type of engine.

A template engine is what is used to run code in templates. There are various types of template engines that will allow you to do different things with different syntax in your templates, different ways of getting your variables in a template, etc. PHPTemplate uses files ending in .tpl.php. So this all works because there is some kind of code that can interpret them

Read more about PHPTemplate (some old story)

+1

.

Drupal - , Drupal , HTML- .

   
    +-----------+        +----------------+
    | Data from |        | Templates from |
    |  Drupal   |        |     theme      |
    +-----------+        +----------------+
          |                       |
          v      +--------+       v
          +------| Theme  |-------+
                 | Engine |
                 +--------+
                     |
                     v
              +-------------+
              |  Final HTML |
              +-------------+               

Drupal ? , Drupal " ".

Drupal, . , Drupal : PHPTemplate, , , . API- , . API .

Drupal - , Bluemarine

+4

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


All Articles