Question: I wrote custom Twig loader that fetch templates from database and it works in Twig "standalone" library.
Now i want to use that in Symfony2 but can't find where to change Twig loader via Symfony2 settings.

Thx in advance for any tips on that

Answer: 
Have a look at [this page](https://github.com/fabpot/symfony/blob/master/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml) at GitHub. Specially `<parameter key="twig.loader.class">Symfony\Bundle\TwigBundle\Loader\Loader</parameter>`

You can configure this key in your config.yml
To overwrite the key in your config.yml you need to do it under services not twig as it's not support in the configuration parser at the moment (2.0.9)

```
twig:
    cache:...
    debug:...
    ...

services:
        twig.loader:
            class: Acme\CoreBundle\Twig\Loader\FilesystemLoader

```