I use Symfony and Twig in a Silex application.
I have a registration page with a form in:
{% extends "base.twig" %}
{% block title %}Welcome to My Example site{% endblock %}
{% block head %}
{{ parent() }}
{% endblock %}
{% block content %}
<div class="row">
<div class="span12">
<h2>Register</h2>
<p>
Register for this site and we'll give you free access to cool stuff
in addition you can subscribe to our premium content.
</p>
<form action="{{app.config.site.secureUrl}}/register-handler" method="post">
<fieldset >
{{ form_widget(form) }}
<button type="submit" class="btn btn-info">Send</button>
</fieldset>
</form>
</div>
</div>
</div>
{% endblock %}
When I try to display the page, I get the following error:
Twig_Error_Syntax: filter "trans" does not exist in "form_div_layout.html.twig" on line 35
I narrowed this down to a Symfony translation extension extension that is not installed, and as such the default template located at:
vendor\symfony\twigbridge\Symfony\Bridge\Twig\Resources\views\Form\form_div_layout.html.twig
not displayed correctly.
I created a new template based on the above without translation functions.
Question
How can I get a branch to use the new template instead of the standard one?
source
share