BreadcrumbsBundle icon indicating copy to clipboard operation
BreadcrumbsBundle copied to clipboard

override the template in Symfony 4

Open nbutet opened this issue 7 years ago • 3 comments

Hi,

could you, please, tell me how I can do to override the template microdata.html.twig in Symfony 4 and in which directories. I looked in the symfony's documentation, I made this directories but It don't display my template. templates/bundles/WhiteOctoberBreadcrumbsBundle/WhiteOctober/microdata.html.twig

Thanks for your help.

nbutet avatar Apr 25 '18 07:04 nbutet

Hey!

Here's the docs: http://symfony.com/doc/current/templating/overriding.html . According to it, try this path: templates/bundles/WhiteOctoberBreadcrumbsBundle/microdata.html.twig

P.S. Don't forget to clear the cache just in case ;)

bocharsky-bw avatar Apr 25 '18 08:04 bocharsky-bw

Hi,

thank you for your answer, I tried this path but it doesn't work. I cleared the cache but no result :-(

nbutet avatar Apr 25 '18 08:04 nbutet

You can set it in the config. If your template is under

/templates/_shared/_breadcrumbs.html.twig, add do the yaml:

viewTemplate:       '_shared/_breadcrumbs.html.twig'

isfett avatar Apr 28 '18 15:04 isfett