PHP code example of heimrichhannot / contao-twig-templates-bundle

1. Go to this page and download the library: Download heimrichhannot/contao-twig-templates-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

heimrichhannot / contao-twig-templates-bundle example snippets


    <?= \Contao\System::getContainer()->get('huh.utils.template')->renderTwigTemplate($this->getName(), $this->getData()); 

          
        $template = \Contao\System::getContainer()->get('huh.twig.template.factory')->createInstance($this);
        $template->addSupport('custom-forms', true);
        echo $template->render();