Template:If mobile/doc: Difference between revisions
imported>Deadfire Template Doc Creation |
Tungstenchan (talk | contribs) m Text replacement - "BattleTechWiki" to "BattleIntelligence" |
||
| Line 3: | Line 3: | ||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
{{info|Note that {{tlx|If mobile}} only works outside of the Template: namespace.}} | {{info|Note that {{tlx|If mobile}} only works outside of the Template: namespace.}} | ||
This template detects whether it is being used on the mobile version of | This template detects whether it is being used on the mobile version of BattleIntelligence, and displays different content accordingly. | ||
==Rationale== | ==Rationale== | ||
Latest revision as of 00:13, 1 May 2025
| This is a documentation subpage for Template:If mobile. It may contain usage information, categories and other content that is not part of the original template page. |
Lua error: Module:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''.
Note that {{If mobile}} only works outside of the Template: namespace. |
This template detects whether it is being used on the mobile version of BattleIntelligence, and displays different content accordingly.
Rationale
Some features work differently on the mobile website, such as slideshow galleries appearing as ordinary galleries. This template allows better presentation of such content, by e.g. having a "Slideshow" heading when a slideshow is shown, and a "Gallery" heading when a regular gallery is shown.
Usage
{{If mobile|content for mobile website|content for desktop website}}
By default, <span>...</span> tags are used to wrap the specified content. A different tag may be specified using |tag=
- E.g.
|tag=divcan be used if the content contains block-level elements.