Designinfo.in Posted May 23, 2019 Share Posted May 23, 2019 (edited) I want the following: {if isset($products) AND $products} {$tabname=rand()+count($products)} {if isset($display_mode) && $display_mode == 'carousel'} {include file="{$items_owl_carousel_tpl}" items=$products image_size=$image_size} {else} {if device is MOBILE} {include file="{$items_normal_tpl}" items=$products image_size="homepage_default"} {else device is NOT MOBILE} {include file="{$items_normal_tpl}" items=$products image_size="home_default"} {/if} {/if} {/if} What codes should I enter in the IF condition to make sure it detects mobile and not mobile. Also is the IF condition written properly, what should i change in this code? This is TPL File. Edited May 23, 2019 by Designinfo.in Tags Added. (see edit history) Link to comment Share on other sites More sharing options...
joe16 Posted April 19, 2020 Share Posted April 19, 2020 Hi, Have look on this post or this thread. From my point of view, I tried to do image displaying based on this check, but it does not work every time. So I moved with a front solution like "<img>" with "srcset" or "<picture>" with "srcset". Hope this helps Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now