Answer the question
In order to leave comments, you need to log in
How to override custom block in drupal 8?
Please tell me how to correctly name the block template in order to override the custom block.
Created a custom block and wrote 1 word.
Created a block--block--6.html.twig block in my sub-theme in the templates/block/ folder. Refreshed
the page, cleared all the caches - nothing.
What could I have done wrong?
Answer the question
In order to leave comments, you need to log in
Good afternoon,
I advise you to enable debug mode for templates. This mode will display as HTML comments where the output of each template starts and ends, and will indicate any variations of template names to override. After that, it will be enough for you to simply copy the name and rename the desired template.
To do this, you need to update the sites/default/services.yml file:
parameters:
twig.config:
debug: true
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question