Hi all
I want to provide a link to a location. If the website is opened on a mobile device with iOS 6 with the Map-App from apple the location should be target at http://maps.apple.com/… - if not it should be http://maps.google.com/… - can I do that?
Thanks a lot
different link target for different devices
different link target for different devices
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
http://eyelikeit.com/index.php?de_beispiele-webdesign
Re: different link target for different devices
Hi nameless1
Yes, I do have questions:
can the user agent ask if it is iOS6 or higher or not (because than I call for the map app, otherwise for the google map app)
does this <!--if:XXXX-->Do that<!--/if-->-Thing have an else-Thing?
thanks a lot!
macangelo
Yes, I do have questions:
can the user agent ask if it is iOS6 or higher or not (because than I call for the map app, otherwise for the google map app)
does this <!--if:XXXX-->Do that<!--/if-->-Thing have an else-Thing?
thanks a lot!
macangelo
Last edited by macangelo on Wed 7. Nov 2012, 16:39, edited 1 time in total.
Webdesign from Düsseldorf - made with phpwcms (most of it):
http://eyelikeit.com/index.php?de_beispiele-webdesign
http://eyelikeit.com/index.php?de_beispiele-webdesign
Re: different link target for different devices
Please make a test in e.g. frontend_render/test_user_agent.php
I do not know whether the php function HTTP_USER_AGENT returns the operating system version for iOS.
On Android devices, the OS version is displayed, e.g. for a GT-P6800
However, this is not yet implemented in the CMS. You can even add to this distinction in an frontend_render script.
[UPDATE]
I think there is a way to exttract the OS from the User-Agent. This solution can be queried with the built in if statements. -> iOS_V4, iOS_V5, iOS_V6 .....
frontend_init:
The simple version: User-Agent -> Extrahieren der OS Version von iOS
[/UPDATE]
Knut
Code: Select all
<?php
echo ("USER AGENT <br />\n --------------------------------- \n");
dumpVar($_SERVER['HTTP_USER_AGENT']);
echo ("phpwcms_getUserAgent <br />\n --------------------------------- \n");
dumpVar(phpwcms_getUserAgent());
?>
On Android devices, the OS version is displayed, e.g. for a GT-P6800
Code: Select all
Mozilla/5.0 (Linux; U; Android 4.04; de-de; GT-P6800 Build/XXYYZZ) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/ 534.13
[UPDATE]
I think there is a way to exttract the OS from the User-Agent. This solution can be queried with the built in if statements. -> iOS_V4, iOS_V5, iOS_V6 .....
frontend_init:
The simple version: User-Agent -> Extrahieren der OS Version von iOS
[/UPDATE]
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )