WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Hilfe & Support (deutsch) »
  • template if device mobile
  • Print
Pages: [1]   Go Down

Author Topic: template if device mobile  (Read 10141 times)

Offline mikew

  • Posts: 56
template if device mobile
« on: April 13, 2021, 06:32:01 PM »
Wenn Device Abfrage (mit z.B. http://detectmobilebrowsers.com/) gleich Mobile ergibt,
soll ein eigenes Template verwendet werden.
Also 2 Templates; ein "normales" und eines wenn die Website mit einem mobilen Device aufgerufen wird.
Device bestimmen ist ja recht einfach, aber wie bestimme ich dann das Template?
Gruß, Michael
Logged

Offline crnogorac081

  • Posts: 2162
  • Gender: Male
Re: template if device mobile
« Reply #1 on: April 13, 2021, 06:40:52 PM »
Inside template folder make simple if /else

If (mobile) include (mobile.php)
Else include (desktop.php)
Where mobile.ohp and desktop.php is modified index.php for mobile and desktop
Logged
Web developer

Offline mikew

  • Posts: 56
Re: template if device mobile
« Reply #2 on: April 14, 2021, 04:45:19 PM »
oh yes, so simple and so clear, thank you very much!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Hilfe & Support (deutsch) »
  • template if device mobile
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2