1

Is there a way to configure from admin panel a static block to be shown only in mobile view? I want to add a static block "install our mobile application". This block should be seen only by users who access my website from a mobile device.

Thank you!

2
  • no i don't think there is any configure related mobile view in static view Feb 27, 2017 at 9:42
  • Magento confuration not provide this, but you can archive this using css strick same as other things handel in responsive theme. Feb 27, 2017 at 10:03

1 Answer 1

1

in your static block you can do this trick

<div class="cms-block-mobile">

    your content 
</div>
<style>
.cms-block-mobile{
    display:none;
}
@media only screen  and (max-width : 640px) {
    .cms-block-mobile{
        display:block;
    }
}
</style>
2
  • Thank youI I'll try this Feb 27, 2017 at 10:33
  • You are always Welcome :) Feb 27, 2017 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.