I’d like to include form_fields.html.twig (view not bounded to a controller action) within edit.html.twig, actually a view served by MyController.
Given the following directory structure:
MyBundle
- Resources
- views
- MyController
- form_fields.html.twig
- edit.html.twig
In my edit.html.twig i have:
{% block content %}
<form action="{{ path('packages_edit', { 'slug': slug }) }}" method="post">
{% include 'form_fields.html.twig' %}
</form>
{% endblock %}
Not working, got template not found exception. I’ve tried without success:
MyBundle::MyController::form_fields.html.twigMyBundle::form_fields.html.twig::form_fields.html.twigform_fields.html.twig
This should work: