ezsystems/ezpublish-kernel — pull request #544 by lolautruche (2013-10-07 14:43:03+00:00)
Title: Fix EZP-21701: ez_render_field should be able to use current template as parameter

https://jira.ez.no/browse/EZP-21701

## Description
Using `ez_render_field()` it is possible to specify the template that will be used using the optional parameters:

```jinja
{{ ez_render_field(
content,
'my_field_identifier',
{ 'template': 'AcmeTestBundle:fields:my_field_template.html.twig' }
) }}
```

This PR allows to specify the current template as being the source of the block.
This is useful when you want to sporadically override a field template.

```jinja
{% extends "MyBundle::pagelayout.html.twig" %}

{% block content %}

{% endblock %}

{# Here begins the inline block for my ezkeyword field #}
{% block ezkeyword_field %}
{% spaceless %}
{% if field.value.values|length() > 0 %}

{% for keyword in field.value.values %}

{{ keyword }}

{% endfor %}

{% endif %}
{% endspaceless %}
{% endblock %}
```

## Tests
Functional test enhanced.

## Limitation
Like for [Symfony forms](http://symfony.com/doc/current/book/forms.html#global-form-theming), this will only work in templates extending another one.