Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#2 | Screenshot 2021-05-17 at 9.46.11 PM.png | 150.55 KB | BhumikaVarshney |
Adminimal Theme.png | 28.87 KB | bavramor |
Comments
Comment #2
BhumikaVarshney CreditAttribution: BhumikaVarshney as a volunteer and at OpenSense Labs commentedAs 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.