1
有兩個枝杈文件的src /的Myvendor/MyBundle /資源/視圖/ MyApp的/ layout.html.twig和的src /的Myvendor/MyBundle /資源/視圖/ MyApp的/ MyView的。 html.twig。的嫩枝文件路徑樹枝,延伸
SRC的內容/的Myvendor/MyBundle /資源/視圖/ MyApp的/ myView.html.twig
{% extends "layout.html.twig" %}
{% block content %}
view content is here.
{% endblock %}
但我得到一個錯誤
Unable to find template "layout.html.twig" in
"MyVendorMyBundle:MyApp:myView.html.twig"
他們隱藏,他們真的隱藏了事實,你必須從像這樣的'AcmeDemoBundle:Welcome:User/index.html.twig'子文件夾擴展,請參閱http://stackoverflow.com/questions/13514643/including -the-樹枝文件 - 從-A-子目錄 – Toskan