I have html
files with specific tags
under the views
folder. I am using Twig for template processing and rendering.
My index.php
:
<?php
include("lib/init.php");
echo $twig->render('index.html', $data);
?>
Question:
How can I tell Twig to load a specific html from the views folder and add it to the current index.html rendering?
I am unable to find anything in the documentation, I looked at blocks
(https://twig.symfony.com/doc/2.x/functions/block.html).
Other details, composer.json
:
{
"config": {
"platform": {
"php": "8.3.9"
}
},
"require": {
"twig/twig": "^3.10",
"spomky-labs/otphp": "^10.0"
}
}