In a module I have created a custom link by creating a custom route inside the mymodule.routing.file.yml and the mymodule.links.menu.yml file. In my theme.theme file I have defined a hook_page_alter to add a template suggestion. With the debug mode and in the html code of the custom page, I see the proposed template suggestions.
<!-- THEME DEBUG --> <!-- THEME HOOK: 'page' --> <!-- FILE NAME SUGGESTIONS: * page--mycustomtemplate.html.twig x page.html.twig
I have build a new template with this name 'page--mycustomtemplate.html.twig'. After clearing the cache, the new template isn't called, and the default page template is always actived.
Did I forget something?
Thanks for your help.