Hiding modules in mobile view

  • jjk2498
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
10 years 10 months ago #37551 by jjk2498
Hi,

I'm trying to hide some modules in mobile view.
I'm using Sparky framework and Joomla 3.2.3.

If I got it correctly it should be possible by using " hidden-phone" in Advanced property Module Class Suffix.
However this is not working.

On the otherhand " hidden-desktop" works as it should be hiding the same module in desktop view.

Any Ideas what I'm doing wrong ? Or is this feature not supported by Sparky ?

Please Log in to join the conversation.

More
10 years 10 months ago #37556 by ivan.milic
That functionality is not part of sparky. You can do this, open index.php of template find this line:
Code:
<body<?php if ($menu->getActive() == $menu->getDefault()) { echo ' class="sparky_home"'; }else{ echo ' class="sparky_inner"'; } ?>>

replace it with:
Code:
<?php $browser = JBrowser::getInstance(); $mobile_class = $browser->isMobile() ? " mobile" : " desktop"; ?> <body<?php if ($menu->getActive() == $menu->getDefault()) { echo ' class="sparky_home".$mobile_class'; }else{ echo ' class="sparky_inner"'.$mobile_class; } ?>>


then in template_css.css

add at bottom:

.mobile .hidden-phone{
display:none!important;
}


.desktop .hidden-desktop{
display:none!important;
}


then you can you that like you imagined it

Please Log in to join the conversation.

  • jjk2498
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
10 years 9 months ago #37576 by jjk2498
Doesn't provide wanted outcome
" hidden-phone" does nothing.
" hidden-desktop" hides modules both in desktop view and mobile view.

Is official Bootstrap 3 like hide/view support for different display sizes coming to sparky in near future ?

Please Log in to join the conversation.

More
10 years 9 months ago #37581 by ivan.milic
Send link and tell us where do you have what so we could check

Please Log in to join the conversation.

  • jjk2498
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
10 years 9 months ago #37588 by jjk2498
Sorry I can't,

Currently site is running on my desktop in virtualmachine. No connections outside local network.

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
10 years 9 months ago #37645 by milos
Replied by milos on topic Hiding modules in mobile view
Unfortunately, we can't help you until you put your site online.

Please Log in to join the conversation.

Time to create page: 0.169 seconds
Powered by Kunena Forum