What is TwitalBundle?

TwitalBundle is a Symfony2 bundle that integrates the Twital template engine into Synfony2. This enables you to use all Twig/Symfony2 functionalities with the Twital template engine language syntax.

To learn more about Twital, you can read the dedicated documentation.

Install

There are two recommended ways to install TwitalBundle via Composer:

  • using the composer require command:
composer require 'goetas/twital-bundle:*'
  • adding the dependency to your composer.json file:
"require": {
    ..
    "goetas/twital-bundle": "*",
    ..
}

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 used for file extension matching
goetas_twital:
    source_adapter:
        - { service: twital.source_adapter.xml, pattern: ['/\.xml\.twital$/', '/\.atom\.twital$/'] }
        - { service: twital.source_adapter.html, pattern: ['/\.html\.twital$/', '/\.htm\.twital$/'] }
        - { service: twital.source_adapter.xhtml, pattern: ['/\.xhtml\.twital$/'] }

Integration

TwitalBundle comes with all features that are already supported by TwigBundle (forms, translations, assetic, routing, etc).

Contributing

This is an open source project - contributions are welcome. If your are interested, you can contribute to documentation, source code, test suite or anything else!

To start contributing right now, go to https://github.com/goetas/twital-bundle and fork it!

You can read some tips to improve your contributing experience looking into https://github.com/goetas/twital-bundle/blob/master/CONTRIBUTING.md present inside the root directory of Twital GIT repository.

Contents

Note

I’m sorry for the terrible english fluency used inside the documentation, I’m trying to improve it. Pull Requests are welcome.