0

I am developing a drupal 10 site with ddev in my ubuntu machine on process for overriding html.twig template in my bootstrap sub theme during debugging FILE NAME SUGGESTIONS shows name links--contextual.html.twig.I copied themes/contrib/bootstrap/templates/system/links.html.twig file and paste it in my sub theme path with renaming it as suggested to web/themes/custom/my_bootstrap_subtheme/templates/links--contextual.html.twig, But this process not override the html.twig file. I encountered with this issues. links--contextual.html.twig file doesn't override links.html.twig.

I tried several other ways like checked file permissions and ownership, direct override, file renamimg with links.html.twig and links--contextual.html.twig,ensured Correct Naming and Path, Clear Drupal Cache, make a minor change for verification on twig file, checked the frontend, checked template suggestions, checked sub-theme activation, manually inspected the directories and file permissions to ensure that everything is as expected.

1 Answer 1

0

I suggest to enable debug mode for twig by update the web/sites/development.services.yml and add these below values:

parameters: twig.config: { debug: true, auto_reload: true, cache: false }

then clear the cache

you will see the template files suggestion over each hook in the html markup by inspect element or using browser's developer tools

enter image description here

you can override the twig file by clone the original or current rendered twig in your custom subtheme

Sign up to request clarification or add additional context in comments.

1 Comment

Also try altering theme suggestions bing.com/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.