exponentcms / exponent-cms

Content Management, Simple.
exponentcms.org
GNU General Public License v2.0
60 stars 24 forks source link

Feature request: Smart Heading levels #1442

Open exponentcms opened 4 years ago

exponentcms commented 4 years ago

While the user selectable title/item heading levels help a great deal when there are multiple modules per page, to ensure there is only one H1 tag per page...it tends to ripple into some pages not having any H1 tags. E.g., when you have a blog showall module/view on a page with serveral other modules and have it set for H2/H3 heading levels, the 'show' page for a blog article will inherit the H2/H3 tags but should use H1/H2 for SEO and accessibility purposes.

The simplest solution? may be to create a 'heading' smarty function|modifier plugin which auto-adds the tags and can somewhat auto-senses (based on inaction()) whether to 'promote' the tags?

exponentcms commented 4 years ago

This would also have to take into account whether it was in the main content area or in a sidebar. inaction() would be true for both.

exponentcms commented 4 years ago

[bulk edit]

exponentcms commented 4 years ago

[bulk edit]

exponentcms commented 4 years ago

[bulk edit]

exponentcms commented 4 years ago

We'd likely require a smarty block plugin to best implement this since we'd require an opening and closing tag. We'll also implement a 'heading level' constant array which will better allow selecting the heading level via algorithm.

exponentcms commented 4 years ago

Lighthouse URL: https://exponentcms.lighthouseapp.com/projects/61783/tickets/1399

dleffler commented 2 years ago

I've gotten a demo running locally...based on if module is running in the main() container or not...because in theory the main content is based on the main content of the page being displayed and all the additional hard-coded modules (such as sidebar, footer, etc... are less important.