Closed fitzage closed 5 years ago
{{ useragent:is_mobile }} and {{ useragent:is_desktop }} return true/false correctly.
{{ useragent:is_mobile }}
{{ useragent:is_desktop }}
However, I can't seem to find a way to use these in conditional statements. {{ if useragent:is_desktop }} does not work as expected.
{{ if useragent:is_desktop }}
Antlers has a different way to use tags inside if conditions, check Conditions on Tags vs Variables
So it would be
{{ if { useragent:is_mobile } }}
{{ useragent:is_mobile }}
and{{ useragent:is_desktop }}
return true/false correctly.However, I can't seem to find a way to use these in conditional statements.
{{ if useragent:is_desktop }}
does not work as expected.