Page assignments based on device (mobile/desktop)?

  • 3
  • Question
  • Updated 4 months ago
  • Answered
Is this possible?

Or do I have to create a different set of tabs for mobile?
Photo of Matt Sones

Matt Sones, Champion

  • 31,530 Points 20k badge 2x thumb

Posted 4 years ago

  • 3
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
We have wanted to do page assignments by device type since we rolled out Mobile 18 months ago.  We just haven't been able to get it done.  Sorry.  

For now, make a different set of tabs...  And don't run your detail pages through page assignments,  but rather include the data in a single moble "list / detail" combined page.  Or build specific references to the Mobile skuid pages in URL redirct links.   Its a pain.  I know.. 
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,406 Points 5k badge 2x thumb
Is this still not possible? Any progress? Thanks!
Photo of Josef Lagorio

Josef Lagorio

  • 2,926 Points 2k badge 2x thumb
Hey Chad,

Curious what your use case for this would be. 
Photo of Chad Gill

Chad Gill

  • 1,194 Points 1k badge 2x thumb
i have skuid detail pages that have more field than i need to show in the mobile view.  I am using a visualforce override on the view action.  However i want to show a trimmed version to mobile users and the full version to desktop users
Photo of Josef Lagorio

Josef Lagorio

  • 2,926 Points 2k badge 2x thumb
You could use the CSS @media rule to hide/show certain sections of your pages by using the display property. 

Example CSS:

@media all and (max-width: 600px) {
    /*insert IDs of elements to be hidden on mobile */ #sk-1bc-789   {
        display:none;
    }


@media all and (min-width: 601px) {
    /*insert IDs of elements to be hidden on desktop */ #sk-1bc-779   {
        display:none;
    }
}

https://www.w3schools.com/cssref/css3_pr_mediaquery.asp
Photo of Chad Gill

Chad Gill

  • 1,194 Points 1k badge 2x thumb
Thanks! i will give this a try for sure.
Photo of Chad Gill

Chad Gill

  • 1,194 Points 1k badge 2x thumb
where would you apply it on the skuid page? I have a responsive grid encapsulating the whole page, enter it in the css class there?