sampart / BreadcrumbsBundle

A small breadcrumbs bundle for Symfony
Other
188 stars 68 forks source link

override the template in Symfony 4 #92

Open nbutet opened 6 years ago

nbutet commented 6 years ago

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.

bocharsky-bw commented 6 years ago

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 ;)

nbutet commented 6 years ago

Hi,

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

isfett commented 6 years ago

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'