fabpot/Twig — pull request #1433 by hason (2014-07-05 22:28:55+00:00)
Title: [WIP] Added support for custom variables in block function

If you must use this workaround:
```jinja
{# blocks.twig #}
{% block foo %}
{{ var }}
{% endblock %}

{# page.twig #}
{% use "blocks.twig" %}
{% set oldvar = var %}
{% set var = "newvalue" %}
{{ block("foo") }}
{% set var = oldvar %}
```

After this PR everything will be easier:
```jinja
{# page.twig #}
{% use "blocks.twig" %}
{{ block("foo", {"var": "newvalue"}) }}
```

TODO:

* [ ] Add same functionality for ``parent()``
* [ ] Documentation