Summary:
You cannot use assign and isMobile together
Detailed Description:
You cannot use assign and isMobile together, so if you want todo something
simple like this in a pages 'Page Specific Metadata':
{browsertools action="isMobile" assign=isMobileDevice}
{if ($isMobileDevice=='true')}
{* I'm a Mobile device - Let's Dance*}
{else}
{* I'm NOT Mobile - Let's Sleep *}
{/if}
But you can is you make these changes about line 918 - the code could probably
do with a bit of tiding up...
//Changed by Russ Friday 13th 2010 to allow isMobile and Assign together
if($action=='isMobile')
{
$assign = isset($params['assign']) ? $params['assign']:false;
if( $browser->isMobile()) {
//return 'true';
$outputting = 'true';
if($assign!=false)
{
$smarty->assign($assign,$outputting);
return;
}else{
return 'true';
}
}else{
//return 'false';
$outputting = 'false';
if($assign!=false){
$smarty->assign($assign,$outputting);
return;
}else{
return 'false';
}
}
}
Hope this helps Jeremy, they maybe a better way of achieving the same thing, if
so please let me know ;-)
Russ