Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Announcements
Random page
Help about MediaWiki
SPS Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Editing
Template
:
IsDesktop/doc
Template
Discussion
Canadian English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
Special pages
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
:;Template copied from [https://genshin-impact.fandom.com/wiki/Template:IsDesktop Genshin Impact Wiki] <strong>Note: This template must have the template type "Notice" in order to work properly.</strong><br> 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]]) ==Syntax== <pre> {{#if:{{IsDesktop}} | Content for desktop | Content for mobile }} </pre> ==Examples== <pre> {{#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>] }} </pre> {{#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=fandomdesktop}} <span class="wds-button">Switch to desktop view</span>] }} <pre> <div class="mw-collapsible {{#if:{{IsDesktop}}||mw-collapsed}}"> Collapsed by default only on mobile </div> </pre> <div class="mw-collapsible {{#if:{{IsDesktop}}||mw-collapsed}}"> Collapsed by default only on mobile </div> (On mobile, the collapsible above is collapsed by default,<br> and an "Expand" button should appear here on the right --><br> while on desktop it is expanded by default) ==Technical explanation== Certain template types behave differently on the mobile view (see [[wp:Help:Template types|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 <code>#if</code> parser function, we can make the parser to render different Wikitext for desktop and for mobile.<includeonly>[[Category:Templates]]</includeonly> <noinclude> [[Category:Template documentation]] [[Category:Documentation]] </noinclude>
Summary:
Please note that all contributions to SPS Wiki are considered to be released under the CC-BY-SA license. If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, copied it from a public domain or similar free resource, are quoting material from elsewhere within a sufficiently limited scope to qualify as fair use, or are using material from SPS' games within the scope of our content policy.
Cancel
Editing help
(opens in new window)
Page included on this page:
Template:IsDesktop
(
edit
)
Search
Search
Editing
Template
:
IsDesktop/doc
Add topic