goetas / twital-bundle
Twital templating engine Symfony Bundle
Installs: 6 441
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 3
Forks: 6
Open Issues: 2
Type:symfony-bundle
Requires
- php: ^5.5.9|^7.0|^8.0
- goetas/twital: ^1.1
- symfony/twig-bundle: ^3.0|^4.0|^5.0|^6.0
- symfony/yaml: ^3.0|^4.0|^5.0|^6.0|^6.0|^7.0
- twig/twig: ^1.38|^2.4|^3.0
Requires (Dev)
- jms/translation-bundle: ^1.0
- kriswallsmith/assetic: ^1.0
- phpunit/phpunit: ^4.8.28|^5.6.3|^6.0|^7.0|^8.0
- symfony/framework-bundle: ^3.0|^4.0|^5.0|^6.0
- symfony/templating: ^3.0|^4.0|^5.0
- symfony/var-dumper: ^3.0|^4.0|^5.0
This package is auto-updated.
Last update: 2024-11-02 17:41:52 UTC
README
TwitalBundle (Twital with Symfony)
TwitalBundle is a Symfony bundle that integrates the Twital template engine into Synfony2 framework. This enables you to use all Twig/Symfony functionalities with the Twital template engine language syntax.
To learn more about Twital, you can read the dedicated documentation.
Install
The recommended way to install TwitalBundle is using Composer:
composer require 'goetas/twital-bundle'
If you are using Symfony Flex, the bundle will be automatically enabled and configured, otherwise follow the next steps.
Enable the bundle
To enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Goetas\TwitalBundle\GoetasTwitalBundle(), //.. ); }
Configure
In order to make it work, you have to enable the twital
template engine inside your config.yml
.
framework: templating: engines: ['twig', 'twital'] #optional configurations for file extension matching goetas_twital: source_adapter: - { service: twital.source_adapter.xml, pattern: ['/\.xml\.twital$/', '/\.atom\.twital$/'] } - { service: twital.source_adapter.html5, pattern: ['/\.html\.twital$/', '/\.htm\.twital$/'] } - { service: twital.source_adapter.xhtml, pattern: ['/\.xhtml\.twital$/'] }
Documentation
Go here http://twitalbundle.readthedocs.org/ to read a more detailed documentation about TwitalBundle.
Integration
TwitalBundle comes with all features that are already supported by TwigBundle (forms, translations, assetic, routing, etc).