- Posts: 11
- Thank you received: 0
Hiding modules in mobile view
-
jjk2498
Inactive member - Topic Author
- New Member
Less
More
10 years 10 months ago #37551
by jjk2498
Hiding modules in mobile view was created 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 ?
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.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 9 months ago #37556
by ivan.milic
Replied by ivan.milic on topic Hiding modules in mobile view
That functionality is not part of sparky. You can do this, open index.php of template find this line:
replace it with:
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
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
Less
More
- Posts: 11
- Thank you received: 0
10 years 9 months ago #37576
by jjk2498
Replied by jjk2498 on topic Hiding modules in mobile view
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 ?
" 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.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 9 months ago #37581
by ivan.milic
Replied by ivan.milic on topic Hiding modules in mobile view
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
Less
More
- Posts: 11
- Thank you received: 0
10 years 9 months ago #37588
by jjk2498
Replied by jjk2498 on topic Hiding modules in mobile view
Sorry I can't,
Currently site is running on my desktop in virtualmachine. No connections outside local network.
Currently site is running on my desktop in virtualmachine. No connections outside local network.
Please Log in to join the conversation.
Time to create page: 0.086 seconds