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>]
}}
<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 :
- Template:Ability List
- Template:Armor Protection
- Template:Bestiary Table
- Template:Book
- Template:Boosted Box
- Template:Character Information
- Template:DPL Table
- Template:DPL Table/Documentation
- Template:Equipment Set
- Template:Equips Set
- Template:Equips Set Basic
- Template:Eventviewer
- Template:Ilink
- Template:Infobox Book/Display
- Template:Infobox Creature/CompactBox
- Template:Infobox Creature/CompactBox2
- Template:Infobox Creature/CompactBoxBoosted
- Template:Infobox Creature/CompactBoxBoostedBoss
- Template:Infobox Item/Table Row
- Template:Infobox Item/Wand
- Template:Infobox NPC/Wikitable
- Template:Infobox Object.gp/weight
- Template:Infobox Object/Ammo2
- Template:Infobox Object/Armor
- Template:Infobox Object/Bow
- Template:Infobox Object/ChargedBow
- Template:Infobox Object/ChargedWand
- Template:Infobox Object/ChargedWeapon
- Template:Infobox Object/DistWeapon
- Template:Infobox Object/EnchantedWeapon
- Template:Infobox Object/Fansite
- Template:Infobox Object/Fist
- Template:Infobox Object/FistWeapon
- Template:Infobox Object/FoodSimple
- Template:Infobox Object/Household
- Template:Infobox Object/Imbuable
- Template:Infobox Object/List
- Template:Infobox Object/Mobile
- Template:Infobox Object/NonRegenerativeFood
- Template:Infobox Object/Quiver
- Template:Infobox Object/Rune
- Template:Infobox Object/ThrowingWeapon
- Template:Infobox Object/Tile Wikitable
- Template:Infobox Object/Update
- Template:Infobox Object/Wand
- Template:Infobox Object/Weapon2
- Template:Infobox Object/WeaponReplica
- Template:Infobox Object/Winter 2024 Weapon
- Template:Infobox Object/Writable
- Template:Infobox Outfit
- Template:Infobox Spell/RuneSpell
- Template:Infobox Spell/Spell
- Template:Infobox Transcript
- Template:Infobox Transcript/Documentation
- Template:Infobox Weapon/List
- Template:Item Icon
- Template:Item Tile
- Template:Loot
- Template:Minimap
- Template:NPC Group
- Template:NPC Icon
- Template:NPC Table
- Template:NPCList
- Template:Outfit Icon
- Template:Userpage1
- Template:Userpage2
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.