Different Content for Phones and Tablets

Applies to: Jamroom 7.0+ Last verified: 2026-10-24

Table of Contents:


The template functions
Or use CSS
  • The template functions

    Two functions tell a template what device the visitor uses:

    • jrCore_is_mobile_device() is true on phones
    • jrCore_is_tablet_device() is true on tablets

    Use them in an {if} tag:

    {if jrCore_is_mobile_device()}
        {* content for phones *}
    {elseif jrCore_is_tablet_device()}
        {* content for tablets *}
    {else}
        {* content for desktops *}
    {/if}
  • Elastic 2 uses them in header.tpl and footer.tpl to switch to a phone menu.

  • Or use CSS

    To change only the look, CSS is usually simpler. Elastic 2 has override_mobile.css and override_tablet.css for this. Change them on the Style tab, or in a clone's files.

Tags