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 421 posts 1038 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 11280 posts 23678 karma points MVP 11x 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

Please Sign in or register to post replies

Write your reply to:

Draft