How to render a specific page using my template mypage.html.twig?

40 views Asked by At

I want to render a specific page using my own template. My theme regulating html.html.twig and page.html.twig. I want to rebuild completely the page.html.twig but only on specific page.

In my module based on ControllerBase I can only change the content of the page. How can I change the entire page template, but do not touch html theme wrapper?

1

There are 1 answers

0
Thao Mario On

You can enable theme debug in the services.yml file:

#twig.config:
# debug: true

Clear the cache and reload the page, and you will see comments suggesting you to customize the template for each page you want.

enter image description here

Create a file in my theme.