Problem/Motivation
There is no way to choose if the title will be displayed with h1, h2, etc. It's always a h2 tag.
For a good SEO, it would be good if we could select h1 on the Header banner.
Proposed resolution
Add a heading level select list field with the options: h1, h2, h3, h4, h5, h6
Render the hero banner using the selected heading level field.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3460078-newFIeld.png | 41.12 KB | aleevas |
Issue fork lb_hero-3460078
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
carolpettirossi commentedI added the field, updated the templates, and kept the same styling for any choice of heading level by adding a block-title class.
Could someone please review it?
Comment #4
aleevasComment #5
aleevas@carolpettirossi, Thank you for your code! It looks good, but I had to change the hook_update function to make importing the fields work well. Also, I bumped the changed libraries version.
The new field looking:
Ready for review
Comment #7
froboyComment #8
froboyCouple issues raised from QA:
- the form is no longer using the Entity Browser
- Header level should only allow H1 or H2
Comment #10
froboyComment #11
froboy