ページを表示する xxx.html.twig ファイルがありますが、別のデータでページを更新し、新しいデータで更新したい場合は、選択ボタンと送信ボタンがあります。問題は、小枝からパラメーターを渡して新しいデータを呼び出すコントローラーでアクションを呼び出す方法がわからないことです。その後、同じ小枝テンプレートを新しいパラメーターで再度レンダリングします。
どうすればいいですか?
いくつかの方法を次に示します。
{{ render(app.request.baseUrl ~ '/helper/test', {"hostid2": hostid } ) }}
また
{% include 'MyCoreBundle:Helper:test.html.twig' with {"hostid2": hostid } only %}
また
{% render controller("MyCoreBundle:Helper:test", {'hostid2': hostid}) %}
{% render 'YourBundle:YourController:yourAction' with {'var': value} %}
{{ render(controller('YourBundle:YourController:yourAction', {'var': value})) }}
そしてもちろん、ドキュメントを読んでください。