Full website link on mobile frontend

How we can browse mobile version on PC and PC version on mobile?
So as we can give link to mobile users to view full website and link for PC users to view light (mobile) version.


1 answer

  • -1
    Mike Webasyst August 22, 2014 04:31 #
    Create additional settlements for your website with URLs /mobile/ and /nomobile/ (these are just examples, you may change these URLs as you like).

    Create 2 copies of your current design theme.

    In one of the copies, change conditions {if $wa->isMobile()}...{/if} to {if true || $wa->isMobile()}...{/if} and change {if !$wa->isMobile()}...{/if} (note the exclamation mark!) to {if false && !$wa->isMobile()}...{/if}. This will be your mobile-only theme version.

    In the other copy, change conditions {if !$wa->isMobile()}...{/if} (note the exclamation mark!) to {if true || !$wa->isMobile()}...{/if} and change conditions {if $wa->isMobile()}...{/if} to {if false && $wa->isMobile()}...{/if}. This will be your desktop-only theme version.

    Attach each of these theme versions to the appropriate settlement created above and add links to those settlements in your main design theme using a condition like this:

    {if $wa->isMobile()}
    <a href="{$wa_url}/nomobile/">View full website version (for desktops)</a>
    <a href="{$wa_url}/mobile/">View light (mobile) website version</a>

Add answer

To add a comment please sign up or login