WebsiteBaker Community Forum

WebsiteBaker Support (2.12.x) => General Help & Support => Hilfe & Support (deutsch) => Topic started by: mikew on April 13, 2021, 06:32:01 PM

Title: template if device mobile
Post by: mikew 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
Title: Re: template if device mobile
Post by: crnogorac081 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
Title: Re: template if device mobile
Post by: mikew on April 14, 2021, 04:45:19 PM
oh yes, so simple and so clear, thank you very much!