How can I overwrite the node-edit-form.html.twig.

How can I overwrite the node-edit-form.html.twig. I added the node-edit-form.html.twig in the adminimal theme under templates, but the theme doesn't show the changes from me. Where else should I put the node-edit-form.html.twig? Is this even the right way to do it?

Thanks a lot

Bavra

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bavramor created an issue. See original summary.

BhumikaVarshney’s picture

Status: Active » Needs review
FileSize
150.55 KB

As discovered in this case is to place the template into the subtheme.

When adding new templates to your subtheme it's important to be aware of the fact that there are usually two active themes in any Drupal site: the default one for "front-end" and an admin one for the "back-end" side.

There is also a part of the site that is ambiguous about whether it falls under "front-" or "back-end", and that is Editing content pages.

There is a setting under Appearance that controls which theme should be used for editing content. When adding a template for content-editing pages it's important to double-check which theme is chosen there to know which theme to add the template to.

As always, adjust the Appearance settings to use the subtheme.

And the node-edit-form.html.twig is the part of BE theme or admin theme and we are placing the override template in FE theme.