プロジェクトを Symfony 2.0.22 から 2.2.0 にアップグレードし、いくつかの変更を確認していますが、これでブロックされています:
(Sf 2.0.X のように) ヘッダーをコントローラーでレンダリングしたいのですが、「レンダリング」小枝メソッドが機能しません。彼らはエラーです:
「OSSiteBundle:Index:index.html.twig」でテンプレートのレンダリング中に例外がスローされました (「「GET Index:header」のルートが見つかりません」)。
実際のレンダリング方法は次のとおりです。
{# src/OS/SiteBundle/Resources/views/layout.html.twig #}
...
{% render "OSSiteBundle:Index:header" with {'thisid' : block('thisid'), ... } %}
私は試した :
{{ render('OSSiteBundle:Index:header' , {'thisid' : block('thisid'), 'thistitle' : block('thistitle'), 'thisunderpageid' : block('thisunderpageid'), 'thisbackground' : block('thisbackground') }) }}
{{ include("OSSiteBundle:Index:header.html.twig", {'thisid' : block('thisid'), 'thistitle' : block('thistitle'), 'thisunderpageid' : block('thisunderpageid'), 'thisbackground' : block('thisbackground') }) }}
=>最後のものは機能しますが、コントローラーはこの方法で収集されません
routing.yml のパスを使用してレンダリングを試みました...他に助けてください!