php - Extending twig template when both are within /app directory -
I am trying to create custom error pages in symfony2, but my site theme inside error.html.twig / There is a problem using the layout
As I mentioned here:
I overridden the error file and received my base.html.twig Besides, just out of curiosity, is there any way to override the 'Twelve Bundle' bundle, especially without any error pages within one of my ponds? UPDATE OK, it was resolved with the help of 'Wow J'. It has been found that the file was being found, but the file which was extended It is using is_granted if it is called in the docs then by adding the The complete syntax for the template path is If If then Less : You can only use app / resource / twig bundle / view / Exception / error is put in html.twig . If I use static content it all works fine, but I would like to use the
{% extends ':: base.html.twig'%} as I would with all other pages Yes, so I can copy my current layouts and styles.
is located on app / resource / visual / base.html.twig . How do I go about expanding this template?
app.user and if written in the statement.
:: base.html.twig syntax is not relative. This means that it will work everywhere.
BundleName: DirName: FileName . Then the
AcmeDemoBundle: page: home.html.twig refers to
@ AcmeDemoBundle / resource / view / page / home.html.twig .
DirName is not used, eg
AcmeDemoBundle :: layout.html.twig, call it
@ AcmeDemoBundle / Resource / View / Will be resolved for layout.html.twig .
BundleName is not used, it is assumed that the
app / resource / view in the template.
: base.html. Twenty refers to the full path
app / resource / view / base.html.twig (this is not complete, because I do not know the full path for the
app < / Code> Deer in your case, but when symphony does it will be complete).
:: base.html .twig
Comments
Post a Comment