Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Cort Larsen 388 posts 922 karma points
    Dec 10, 2011 @ 13:44
    Peter Cort Larsen
    0

    detect device orientation in xslte

    hi,

    do any of you have an ideahow to detect a mobile device orientation: portrait or landscape in xslt?

    i need a way to decide which img tag to show based on te above condition.i tried using js in the xslt file with no luck.

     

    peter

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Dec 10, 2011 @ 13:55
    Jan Skovgaard
    0

    Hi Peter

    You should be able to use CSS Media queries to achieve this.

    But if you need to know the orientation to serve a different template according to the screen size and orientation then you should probably make a XSLT extension that can return the answer so you can decide which HTML to serve for the device if that is what you need to do?

    /Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies