xeki-tech / html-twig
There is no license information available for the latest version (1.0.7) of this package.
Handing twig in xeki framework
1.0.7
2021-07-28 20:40 UTC
Requires
- php: >=7.2.5
- twig/twig: ^3.3
This package is auto-updated.
Last update: 2025-04-29 01:34:10 UTC
README
Lib for use twig Doc twig for templates: https://twig.symfony.com/doc/3.x/templates.html Twig min ^3
Example use
$html = \xeki\module_manager::import_module('html-twig');
$data = [];
$data[name]='nameUser';
$html->render('users/list_all.html',$data);
Example template
{% for item in users %}
<li>{{ item.name }}</li>
{% endfor %}
{% if name starts with 'F' %}
<li>{{ item.name }}</li>
{% endif %}