Best Practice For Avoiding Duplicate H1 Or Content When Using Multiple Responsive Hero Modules In SP Page Builder - Question | JoomShaper
🎃 Halloween Sale is Live! Get 35% OFF on all plans. Sale ends soon! Get Offer

Best Practice For Avoiding Duplicate H1 Or Content When Using Multiple Responsive Hero Modules In SP Page Builder

marvays

marvays

SP Page Builder 4 months ago

Hello SP Page Builder community,

I am working on a Joomla 5 site using SP Page Builder. My design requires two hero modules: one optimized for desktop, the other for mobile devices. Each module has a distinct H1 heading and content tailored to its target screen size.

To achieve responsive behavior, I currently include both modules in the DOM and use CSS to show/hide them based on viewport size. However, this causes duplicate H1 tags and duplicate content in the DOM, which I want to avoid for SEO and accessibility reasons.

I have explored client-side JavaScript solutions to remove non-visible modules from the DOM, but these approaches are unreliable or cause flickering and indexing issues.

My questions are:

Does SP Page Builder support any built-in or recommended method to conditionally render or load modules/content based on device or screen size, so that duplicate H1 or content doesn’t exist simultaneously in the DOM?

If not, what is the best practice within SP Page Builder for handling drastically different content or headings for mobile and desktop views without duplicating content in the DOM?

Would creating separate modules and using Joomla template overrides or PHP device detection be the advisable approach?

Any tips, extensions, or workflows you recommend to handle this common responsive content challenge?

Thank you for your insights and advice!

For example: https://nasadovky.cz

0
2 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 4 months ago #195290

Hi there,

Thank you for reaching out. At this moment, SP Page Builder does not support conditional rendering of content or modules based on screen size at the DOM level. While CSS-based visibility control is available, it does not prevent duplicate content from being present in the DOM, which, as you mentioned, can impact SEO and accessibility.

However, your concerns are absolutely valid, and I’ll be sharing your thoughts and suggestions with our developer team for future consideration.

Best regards,

Toufiqur Rahman (Team Lead, Support)

0
marvays
marvays
Accepted Answer
4 months ago #195332

Thank you for your insights :)

0