Using Drupal 8, In a teaser mode, I've managed to get the data that I want to be displayed but the markup is different than what I want. how can I change the html generated for specific fields such as, [body] or [tags] using the theme function.
1
votes
1 Answers
1
votes
First, goto your /sites/default/services.yml And, under "twig.config", search for "debug: false" Make it true, clear cache. Now, refresh your page.
Now, inspect your html or view its source. You will see the twig file path from where its theming/html is coming.
Just copy that file in your theme's template folder, and do changes accordingly.