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 do I change <h2>
to <h4>
in sidebar, without breaking the layout?
I have copied the block.html.twig to theme, and changed <h2>
to <h4>
but this breaks the layout.
Comment | File | Size | Author |
---|---|---|---|
#4 | zircon_sidebar.png | 326.24 KB | daiwik.addweb |
Comments
Comment #2
idflorin CreditAttribution: idflorin commentedComment #3
idflorin CreditAttribution: idflorin commentedComment #4
daiwik.addweb CreditAttribution: daiwik.addweb at AddWeb Solution Pvt. Ltd. commentedHey,
For changing the tags in the sidebar you need to override the specific block twig you place on the sidebar regions which doesn't break the actual layout.
Also, you need to apply CSS for the changed tag in the SCSS file.
Currently, I am not able to make changes in SCSS file due to compass issue.
Please review below screenshot. I placed language block in the left sidebar and override its respective block twig file.
P.S I made changes for styling directly to CSS file as I couldn't generate CSS via compass. Hope this helps
Thanks!.