Jump to content

How to know, in a bloc, that we are shown on a smartphone ?

Recommended Posts

Hello guys.

Do you know how to know that we are in smartphone mode ?

Because in my bloc I only have the following attributs : $records, $title, $orientation='vertical'

I don't have any clue of the application reading the site. Is theres any globals informations ?


Thanks for you helps

Link to comment
Share on other sites

What are you trying to achieve exactly? It would help to know that to give a better answer. 

Those attributes being listed are processed on the server. But the server doesn’t know where the generated page will be displayed and it doesn’t deliver anything different to mobile devices vs. desktop screens. You can however mark content to be shown or hidden based on the viewport size. This is handled through CSS. 


Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...