Disable Modules in mobile devices

Sep '13 Joomla Template
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Oct 30, 2013 11:56 am
Reply with quote
Report this post
Hello there,
is it possible to disable some modules (e.g. the slideshow) in mobile devices?

Thank you in advance
User avatar
Fresh Boarder

GK User
Wed Oct 30, 2013 12:08 pm
Reply with quote
Report this post
Yes, you can use media-queries in override.css to target specific screen resolutions and hide elements basing on that.
If you will be more specific (site url, which module, for what device) I'll prepare custom css for you showing how to do it.
User avatar
Moderator

GK User
Wed Oct 30, 2013 12:37 pm
Reply with quote
Report this post
Thank you for your quick response, i read in some posts there are modul suffix like "nomobile" or "notablets", do they work for the newest framework alos? At the moment i'm testing cloud hosting as well as meet gavern, the new framework is real amazing. My questition in detail:

1. is it possible to update existing templates to the new framework (e.g. cloud host, news, rockwall)?
2. are the modul suffix "nomobile" etc. still working in the new framework?

Thank you again and best regards
User avatar
Fresh Boarder

GK User
Thu Oct 31, 2013 3:36 pm
Reply with quote
Report this post
1. You can update entire template and framework will update with it.
2. Yes, You can still use this selectors. You can find them in small.desktop.css, tablet.css, small.tablet.css and mobile.css. They look this way:
Code: Select all
/* limitation suffixes */
.box.notablet {
   display: block!important;
}
.box.nomobile {
   display: none!important;
}
.box.onlytablet {
   display: none!important;
}
.box.onlymobile {
   display: block!important;
}
.box.notablet.nomobile {
   display: none!important;
}
User avatar
Moderator

GK User
Thu Oct 31, 2013 3:39 pm
Reply with quote
Report this post
But what I would suggest is to use override.css and media-query selector:
Code: Select all
@media all and (max-width: 620px) {
  #uniqueElementID {
    display: none;
  }
}


the max widths for media-queries steps are defined ootb to:
small.desktop.css - max-width: 1260px
tablet.css - max-width: 1030px
small.tablet.css - max-width: 820px
mobile.css - max-width: 620px)
User avatar
Moderator

GK User
Thu Oct 31, 2013 8:54 pm
Reply with quote
Report this post
Thank you for your detailed answer. I wouldt like to show a (or more) Modul only in some menus for mobiles/tablets and in others not, maybe its naiv to go this way. In my mind it looks simpler to do it with suffixes, is it slower? or is it not as professional? my project is a golf course, on mobile the client will see just a few information, e.g. the route, adress, phone, teetime, cost, weather.. and not all the information for clubmembers, photogalleries etc..
Thank you anyway for your real good explanations and best regards.
User avatar
Fresh Boarder

GK User
Sat Nov 02, 2013 11:35 am
Reply with quote
Report this post
The method depends on your preferences. If you don like to edit css and would like to do everything from backend - then suffixes are ok, but if you would like to have 100% control, and see in one file what module is hidden where - then override.css is better.
I prefer the .css method ;)
User avatar
Moderator

GK User
Tue Nov 05, 2013 8:08 pm
Reply with quote
Report this post
Thank you again for your helpfully response. I tried a lot with media-queries, i guess i got it :-). Your right its realy the better choice and not as complicated as i was thinking at first. Thank you for convincing..
User avatar
Fresh Boarder

GK User
Wed Nov 06, 2013 7:28 pm
Reply with quote
Report this post
The only thing you need to remember is do enable media-queries max-width parameter if you ever decide to change widths for devices in template settings (you can define widths for mobile, tablet etc where media-queries kicks in) - then match them with those in your override.css.
User avatar
Moderator


cron