tibia

Note: This template must have the template type "Notice" in order to work properly.
template taken from https://obey-me.fandom.com/wiki/Template:IsDesktop
This template allows showing different content for mobile skin and for desktop skin - not just selectively hiding content, but actually having different Wikitext. (See also #Technical explanation)


Usage

{{#if:{{IsDesktop}}
| Content for desktop
| Content for mobile
}}


Examples

{{#if:{{IsDesktop}}
| You are now on desktop view. [{{fullurl:{{FULLPAGENAME}}|useskin=fandommobile}} <span class="wds-button">Switch to mobile view</span>]
| You are now on mobile view. [{{fullurl:{{FULLPAGENAME}}|useskin=oasis}} <span class="wds-button">Switch to desktop view</span>]
}}

You are now on desktop view. Switch to mobile view


<div class="mw-collapsible {{#if:{{IsDesktop}}||mw-collapsed}}">
Collapsed by default only on mobile
</div>

Collapsed by default only on mobile

(On mobile, the collapsible above is collapsed by default,
and an "Expand" button should appear here on the right -->
while on desktop it is expanded by default)

templates using IsDesktop template :

Technical explanation

Certain template types behave differently on the mobile view (see Help:Template types on Community Central). The template type "Notice", which is intended for editor and maintenance notes, is totally stripped out on the mobile skin since it is mainly aimed for readers.

By combining this behavior with the #if parser function, we can make the parser to render different Wikitext for desktop and for mobile.