How to show or hide content by device in Joomla! 4?

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
simo001
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Sep 27, 2022 9:12 am

How to show or hide content by device in Joomla! 4?

Post by simo001 » Tue Sep 27, 2022 10:56 am

Hi,
are there, in Joomla! 4, classes that hide/show a Joomla module for certain devices?
In joomla 3.x there are the following classes:


visible-phone - visible for 767px screens and below
visible-tablet - visible for 979px to 768pox screens
visible-desktop - visible for 980px screens and up
hidden-phone - hidden for 767px screens and below
hidden-tablet - hidden for 979px to 768pox screens
hidden-desktop - hidden for 980px screens and up

Kind regards

Simon

User avatar
webiedesign
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Sat Oct 14, 2006 11:35 pm

Re: How to show or hide content by device in Joomla! 4?

Post by webiedesign » Tue Sep 27, 2022 6:22 pm

This would generally be controlled within your template and not the Joomla CMS.

User avatar
ceford
Joomla! Ace
Joomla! Ace
Posts: 1358
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: How to show or hide content by device in Joomla! 4?

Post by ceford » Wed Sep 28, 2022 3:00 am

See https://getbootstrap.com/docs/5.1/utili ... g-elements

Put the appropriate class in the module Advanced tab / Module Class field.


Post Reply

Return to “Templates for Joomla! 4.x”