This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi, There is a way to detect the resolution of the visitor and call a content/partial according to his resolution ? I would like to make a different footer to smartphone/tablet and computer, like language "switching" (but automatically) and without JS.
Thanks
Last updated
You can't get the resolution with PHP (remember, this runs on your webserver). However you can make a somewhat advanced guess by parsing the UserAgent Header (that may or may not be present, and may or may not be correct), as Mobile Phones usually other Agents than desktop PCs. Personally, I'd use JS/CSS to make the website responsive. You can even hide/display entire elements with CSS only.
Re, The website is responsive but I would like a different footer. CSS with display:none is my only one solution but I ask if there was a different way with our beautiful OC ;) Thanks
1-3 of 3