mobile detect condition on default desktop style

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • flox80
    New Member
    • Nov 2016
    • 15
    • 5.2.x

    mobile detect condition on default desktop style

    On 4.2.4. , we need some help with a mobile detection <if> . Something like:

    <vb:if condition="MOBILE">
    {vb:raw test1}
    <vb:else />
    {vb:raw test2}
    </vb:if>

    any idea? Thanks.

  • LockedOnLaw
    Senior Member
    • Apr 2010
    • 2311
    • 6.X

    #2
    The if condition mobile has to be defined. vB4 isn't responsive by design so there are no media queries for <768px or a mobile equivalent.

    The other thing is the media queries could be different for portrait and landscape views on the same mobile device.

    I'm not sure how the software would know if the condition was mobile without some custom coding to detect media queries which would have to be added.

    There might be a simpler solution for this but I'm not coming up with one at the moment.

    Comment

    Related Topics

    Collapse

    Working...