fabpot/Twig — Issue #495: [Discussion] Extend/Render PHP?
Author: ericclemmons
Created: 2011-11-02 20:34:56+00:00
State: open

I have a Wordpress site with an embedded application using Silex.

Silex renders a `.twig` template which needs to extend a Wordpress-friendly `layout.php`. Is there a way to do this?

Symfony supports PHP & Twig rendering engines, but it seems you can't transparently go between them.

For example:

```php
output('_content');

get_footer();
```

```twig
{# Is there a better way to do this? #}
{% extends 'layout.php' %}

{% block content %}
I'm being rendered by Silex!
{% endblock content %}
```