Jump to content

Add variable in nav.tpl to show only in Mobile device


seok

Recommended Posts

Hi all

I want to show a different text in blockcontact file "nap.tpl" and the next variables dont worked with PS 1.6.1.13 :

{if $isMobile}mobile resolution content{else}pc resolution content{/if}

{if $mobile_device}mobile resolution content{else}pc resolution content{/if}

{if isset($mobile_device)}mobile resolution{else}pc resolution content{/if}

 

What variable works in PS 1.6.1.13 to show only in mobile device?

 

regards

 

Link to comment
Share on other sites

Ok, the code {if $mobile_device} is working but there are a BIG CACHE ISSUE

If I have Smarty Cache Enabled in "Performance" then on first device where I look website (mobile or pc) is cached and showned exactly in other device is

If I have Smarty Cache Disabled in "Performance" then it is working and showning my standard code in pc and mobile code added {if $mobile_device}

 

How solve this Smarty Cache issue for mobile and desktop views?

 

Edited by seok (see edit history)
Link to comment
Share on other sites

  • 7 months later...
  • 3 weeks later...
  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...