Hi,
on the website http://symfony.com/doc/current/templating/PHP.html Symphony mentions that TWIG can use two engines for processing templates: TWIG and PHP.
TWIG determines the difference by the extension:
myFile.html.twig is processed by the TWIG engine,
myFile.html.php is processed by the PHP engine.
Can I convince GRAV to obey this convention?
Currently I seem to only be able to use the TWIG engine.
I need to create a template that pulls data from a MySQL database and this seems a more appealing way than writing a TWIG extension.
Anyone has insight on this topic?
I’m afraid I can’t answer your specific question, but why not write a plugin that pulls the data from SQL and then injects that data into the Twig variable space? Your standard Twig template then displays that data. That might be the simplest approach.
Thanx for replying PerlKonig.
Jep, I might.
But
1. I’m not that experienced in this field and (the most important)
2. TWIG is said to have a built in mechanisme to switch engines (between TWIG and PHP, depending on the extension (".HTML.TWIG" and “.HTML.PHP”)
So, why reinvent the wheel? … I just can’t find the wheel …