How can I create a custom one 404 pagein Drupal 8?
I created a new page (Content) in the back office called 404(node number 100). I set it as the default 404 page in the " Configuration>" section of the Basic sitesettings Basic site.

It works with the content that I installed in Backoffice.
But now I want it to be edited programmatically, and I do not know how to create an override file for me.
I tried to create mytheme/templates/html--node--100.html.twigand it only works when this URL ( node/100) is requested directly , but it doesn’t work when you try to select a random URL slug and Drupal should allow this. When this happens, drupal provides me with the content that it 404 pagecontains in the back office, and not in the file that I just created.
I tried a few files, such as page--404-html.twig, html--node--404.html.twig, html--page--404.html.twig, ... but it does not work
Can anybody help me?
source
share