M
M
McMike2018-11-30 11:36:52
Drupal
McMike, 2018-11-30 11:36:52

What template engine to use?

It is necessary to receive value for some expression set by the text.
The text contains variables.
Is there any template engine or built-in functionality in Drupal7 that will allow you to call a function with parameters (template, list of variables) and get a response?
Usage example as I see it:
$tempale = "a+b . ' ' . c";
$res = $templater->render($template, ['a' => 1, 'b' => 7, 'c' => 19]);
As a result of $res = "8 19
" worked out the mathematical function and concatenation.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2018-11-30
@andead

Drupal doesn't have that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question