Problem/Motivation
I think the way the "on this page" titles works, out of the box it is looking for H2s. A number of components are missing the ability to add titles and they are not able to be captured in "on this page".
- Accordion
- Slider
- Content
- iframe
- webform
- Callout
- map
- next step
There is also other inconsistencies. One this page links to slides in the slider but not the slider title. I realise that this can be overridden in the theming, but this is a very weird UX by defaultl Slides are generally secondary content and the key items for a page.

Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | civictheme-3456186-2.png | 168.15 KB | sime |
Comments
Comment #2
simeComment #3
simeComment #4
alex.skrypnykComment #5
fionamorrison23 commentedComment #6
richardgaunt commentedAgree, the slider component has a h3 for the title, and then each slide has a h2.
The selector table of contents is preprocessed in `_civictheme_preprocess_node__civictheme_page__full` - this can be overridden by a sub-theme.
I cannot think of a neat way to change this, we could do via theme settings but then it would be site wide, we could do via node but this feels like a bit complicated so will narrow this ticket down to fix the heading hierachy - and want to get away from hacking in business logic into the theme layer.
Comment #7
richardgaunt commentedWork completed here: https://github.com/civictheme/monorepo-drupal/pull/1492
We now have ability to choose heading level for slider (and thus included in TOC) and the slide headings are no longer included in TOC.
Thanks Sime for the issue
Comment #8
richardgaunt commentedComment #9
richardgaunt commented