xeki-tech / html-twig
Handing twig in xeki framework
Installs: 1 002
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.2.5
- twig/twig: ^3.3
This package is auto-updated.
Last update: 2025-07-29 02:24:24 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 %}